mirror of
https://github.com/home-assistant/core.git
synced 2025-12-20 02:48:57 +00:00
Clarify previous state in total_increasing warning message (#158805)
This commit is contained in:
@@ -416,8 +416,8 @@ def warn_dip(
|
||||
_LOGGER.warning(
|
||||
(
|
||||
"Entity %s %shas state class total_increasing, but its state is not"
|
||||
" strictly increasing. Triggered by state %s (%s) with last_updated set"
|
||||
" to %s. Please %s"
|
||||
" strictly increasing. Triggered by state %s (previous state: %s) with"
|
||||
" last_updated set to %s. Please %s"
|
||||
),
|
||||
entity_id,
|
||||
f"from integration {domain} " if domain else "",
|
||||
|
||||
@@ -2261,8 +2261,8 @@ async def test_compile_hourly_sum_statistics_total_increasing_small_dip(
|
||||
last_updated = states["sensor.test1"][6].last_updated.isoformat()
|
||||
assert (
|
||||
"Entity sensor.test1 has state class total_increasing, but its state is not "
|
||||
f"strictly increasing. Triggered by state {state} ({previous_state}) with "
|
||||
f"last_updated set to {last_updated}. Please create a bug report at "
|
||||
f"strictly increasing. Triggered by state {state} (previous state: {previous_state}) "
|
||||
f"with last_updated set to {last_updated}. Please create a bug report at "
|
||||
"https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue"
|
||||
) in caplog.text
|
||||
statistic_ids = await async_list_statistic_ids(hass)
|
||||
|
||||
Reference in New Issue
Block a user