Move write of core state to executor (#5720)

This commit is contained in:
Mike Degatano
2025-03-04 11:49:53 -05:00
committed by GitHub
parent 76e916a07e
commit 324b059970
57 changed files with 288 additions and 274 deletions

View File

@@ -49,11 +49,11 @@ async def test_load(
assert coresys.homeassistant.secrets.secrets == {"hello": "world"}
coresys.core.state = CoreState.SETUP
await coresys.core.set_state(CoreState.SETUP)
await coresys.homeassistant.websocket.async_send_message({"lorem": "ipsum"})
ha_ws_client.async_send_command.assert_not_called()
coresys.core.state = CoreState.RUNNING
await coresys.core.set_state(CoreState.RUNNING)
await asyncio.sleep(0)
assert ha_ws_client.async_send_command.call_args_list[0][0][0] == {"lorem": "ipsum"}