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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
68 changed files with 176 additions and 165 deletions

View file

@ -4340,7 +4340,7 @@ async def test_shutdown_after(
script_obj = script.Script(hass, sequence, "test script", "test_domain")
delay_started_flag = async_watch_for_action(script_obj, delay_alias)
hass.state = CoreState.stopping
hass.set_state(CoreState.stopping)
hass.bus.async_fire("homeassistant_stop")
await hass.async_block_till_done()
@ -4379,7 +4379,7 @@ async def test_start_script_after_shutdown(
script_obj = script.Script(hass, sequence, "test script", "test_domain")
# Trigger 1st stage script shutdown
hass.state = CoreState.stopping
hass.set_state(CoreState.stopping)
hass.bus.async_fire("homeassistant_stop")
await hass.async_block_till_done()
# Trigger 2nd stage script shutdown