mirror of
https://github.com/home-assistant/core.git
synced 2025-04-30 12:17:52 +00:00
Debug statistics metadata issue
This commit is contained in:
parent
c9f0fe3c5d
commit
1a6bf1bdda
@ -587,6 +587,10 @@ def _compile_statistics(
|
|||||||
):
|
):
|
||||||
new_short_term_stats.append(new_stat)
|
new_short_term_stats.append(new_stat)
|
||||||
|
|
||||||
|
if start.minute == 50:
|
||||||
|
# Once every hour, update issues
|
||||||
|
get_metadata(instance.hass, statistic_source=DOMAIN)
|
||||||
|
|
||||||
if start.minute == 55:
|
if start.minute == 55:
|
||||||
# A full hour is ready, summarize it
|
# A full hour is ready, summarize it
|
||||||
_compile_hourly_statistics(session, start)
|
_compile_hourly_statistics(session, start)
|
||||||
|
@ -2079,6 +2079,7 @@ async def test_clear_statistics(
|
|||||||
("new_unit", "new_unit_class", "new_display_unit"),
|
("new_unit", "new_unit_class", "new_display_unit"),
|
||||||
[("dogs", None, "dogs"), (None, "unitless", None), ("W", "power", "kW")],
|
[("dogs", None, "dogs"), (None, "unitless", None), ("W", "power", "kW")],
|
||||||
)
|
)
|
||||||
|
@pytest.mark.freeze_time("2024-07-24 11:50:00+00:00") # Breaks metadata, why?
|
||||||
async def test_update_statistics_metadata(
|
async def test_update_statistics_metadata(
|
||||||
recorder_mock: Recorder,
|
recorder_mock: Recorder,
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user