From bab930a4561d16a08fc9c61a46b8cda4e7028e62 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Mon, 19 Aug 2024 10:37:17 +0200 Subject: [PATCH] Fix flapping ista_ecotrend tests (#124205) --- tests/components/ista_ecotrend/test_statistics.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/components/ista_ecotrend/test_statistics.py b/tests/components/ista_ecotrend/test_statistics.py index 6b2f98affe9..21877f686df 100644 --- a/tests/components/ista_ecotrend/test_statistics.py +++ b/tests/components/ista_ecotrend/test_statistics.py @@ -14,7 +14,7 @@ from homeassistant.helpers import entity_registry as er from .conftest import extend_statistics -from tests.common import MockConfigEntry +from tests.common import MockConfigEntry, async_fire_time_changed from tests.components.recorder.common import async_wait_recording_done @@ -61,8 +61,12 @@ async def test_statistics_import( mock_ista.get_consumption_data = extend_statistics freezer.tick(datetime.timedelta(days=1)) + async_fire_time_changed(hass) + await hass.async_block_till_done() await async_wait_recording_done(hass) freezer.tick(datetime.timedelta(days=1)) + async_fire_time_changed(hass) + await hass.async_block_till_done() await async_wait_recording_done(hass) for entity in entities: