Fix flaky tests in device_sun_light_trigger (#129871)

This commit is contained in:
epenet 2024-11-05 10:55:40 +01:00 committed by GitHub
parent e6c20333b3
commit fa30100160
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -177,6 +177,9 @@ async def test_lights_turn_on_when_coming_home_after_sun_set_person(
hass: HomeAssistant, freezer: FrozenDateTimeFactory
) -> None:
"""Test lights turn on when coming home after sun set."""
# Ensure all setup tasks are done (avoid flaky tests)
await hass.async_block_till_done(wait_background_tasks=True)
device_1 = f"{DEVICE_TRACKER_DOMAIN}.device_1"
device_2 = f"{DEVICE_TRACKER_DOMAIN}.device_2"