diff --git a/tests/components/nest/test_media_source.py b/tests/components/nest/test_media_source.py index b3a4e1a85a32..865f0526ce98 100644 --- a/tests/components/nest/test_media_source.py +++ b/tests/components/nest/test_media_source.py @@ -1694,8 +1694,7 @@ async def test_remove_stale_media( point_in_time = dt_util.utcnow() + datetime.timedelta(days=1) with freeze_time(point_in_time): async_fire_time_changed(hass, point_in_time) - await hass.async_block_till_done() - await hass.async_block_till_done() + await hass.async_block_till_done(wait_background_tasks=True) # Verify that the event media is still present and that the extra files # are removed. Newer media is not removed.