Debug statistics metadata issue
This commit is contained in:
parent
c9f0fe3c5d
commit
1a6bf1bdda
2 changed files with 5 additions and 0 deletions
|
@ -587,6 +587,10 @@ def _compile_statistics(
|
|||
):
|
||||
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:
|
||||
# A full hour is ready, summarize it
|
||||
_compile_hourly_statistics(session, start)
|
||||
|
|
|
@ -2079,6 +2079,7 @@ async def test_clear_statistics(
|
|||
("new_unit", "new_unit_class", "new_display_unit"),
|
||||
[("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(
|
||||
recorder_mock: Recorder,
|
||||
hass: HomeAssistant,
|
||||
|
|
Loading…
Add table
Reference in a new issue