Small speed up to checking core state (#107845)

This commit is contained in:
J. Nick Koston
2024-01-18 08:41:32 -10:00
committed by GitHub
parent 32b0bf6b4e
commit c399cab427
68 changed files with 176 additions and 165 deletions

View File

@ -1152,7 +1152,7 @@ async def test_script_restore_last_triggered(hass: HomeAssistant) -> None:
State("script.last_triggered", STATE_OFF, {"last_triggered": time}),
),
)
hass.state = CoreState.starting
hass.set_state(CoreState.starting)
assert await async_setup_component(
hass,
@ -1373,7 +1373,7 @@ async def test_recursive_script_turn_on(
await asyncio.wait_for(service_called.wait(), 1)
# Trigger 1st stage script shutdown
hass.state = CoreState.stopping
hass.set_state(CoreState.stopping)
hass.bus.async_fire("homeassistant_stop")
await asyncio.wait_for(stop_scripts_at_shutdown_called.wait(), 1)