1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Fix automation failing to restore state (#24390)

* Fix automation off

* Fix tests
This commit is contained in:
Paulus Schoutsen
2019-06-07 23:08:22 -07:00
committed by GitHub
parent 0dc0706eb2
commit 7887d6d6e4
3 changed files with 55 additions and 42 deletions

View File

@@ -29,7 +29,7 @@ def test_if_fires_on_hass_start(hass):
res = yield from async_setup_component(hass, automation.DOMAIN, config)
assert res
assert not automation.is_on(hass, 'automation.hello')
assert automation.is_on(hass, 'automation.hello')
assert len(calls) == 0
yield from hass.async_start()
@@ -64,7 +64,7 @@ def test_if_fires_on_hass_shutdown(hass):
}
})
assert res
assert not automation.is_on(hass, 'automation.hello')
assert automation.is_on(hass, 'automation.hello')
assert len(calls) == 0
yield from hass.async_start()