diff --git a/supervisor/homeassistant/api.py b/supervisor/homeassistant/api.py index feb604214ca..b0d099b1c87 100644 --- a/supervisor/homeassistant/api.py +++ b/supervisor/homeassistant/api.py @@ -164,6 +164,6 @@ async def get_api_state(self) -> str | None: async def check_api_state(self) -> bool: """Return Home Assistant Core state if up.""" - if state := self.get_api_state(): + if state := await self.get_api_state(): return state == "RUNNING" return False diff --git a/tests/conftest.py b/tests/conftest.py index 86c3a531eeb..140b5080c1e 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -353,7 +353,6 @@ async def coresys( ) # WebSocket - coresys_obj.homeassistant.api.check_api_state = AsyncMock(return_value=True) coresys_obj.homeassistant.api.get_api_state = AsyncMock(return_value="RUNNING") coresys_obj.homeassistant._websocket._client = AsyncMock( ha_version=AwesomeVersion("2021.2.4")