diff --git a/tests/components/cloud/test_google_config.py b/tests/components/cloud/test_google_config.py index dfadf80a601..f10a3cdbac5 100644 --- a/tests/components/cloud/test_google_config.py +++ b/tests/components/cloud/test_google_config.py @@ -341,12 +341,13 @@ async def test_sync_google_on_home_assistant_start( config = CloudGoogleConfig( hass, GACTIONS_SCHEMA({}), "mock-user-id", cloud_prefs, hass.data["cloud"] ) - hass.set_state(CoreState.starting) + hass.set_state(CoreState.not_running) with patch.object(config, "async_sync_entities_all") as mock_sync: await config.async_initialize() + await hass.async_block_till_done() assert len(mock_sync.mock_calls) == 0 - hass.bus.async_fire(EVENT_HOMEASSISTANT_STARTED) + hass.bus.async_fire(EVENT_HOMEASSISTANT_START) await hass.async_block_till_done() assert len(mock_sync.mock_calls) == 1