From 5eb3ce695da788bcae649f82c9527c0f9307139c Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 9 Mar 2024 22:58:32 -1000 Subject: [PATCH] fix cloud --- homeassistant/helpers/start.py | 2 +- tests/components/cloud/test_google_config.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/helpers/start.py b/homeassistant/helpers/start.py index d09e542e2e0..94d60a0dca0 100644 --- a/homeassistant/helpers/start.py +++ b/homeassistant/helpers/start.py @@ -63,7 +63,7 @@ def async_at_start( """ def _is_running(hass: HomeAssistant) -> bool: - return hass.is_running + return hass.state is CoreState.running return _async_at_core_state( hass, at_start_cb, EVENT_HOMEASSISTANT_START, _is_running diff --git a/tests/components/cloud/test_google_config.py b/tests/components/cloud/test_google_config.py index dfadf80a601..67c4380c72d 100644 --- a/tests/components/cloud/test_google_config.py +++ b/tests/components/cloud/test_google_config.py @@ -346,7 +346,7 @@ async def test_sync_google_on_home_assistant_start( await config.async_initialize() 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