Add Home Assistant Started event (#34657)

This commit is contained in:
Paulus Schoutsen authored and GitHub committed 2020-04-24 14:13:39 -07:00
1 parent b741199ed3
commit 77443b3d09
8 files changed
+68 -25

No files matched your search

+3 -2
View File
@@ -10,7 +10,7 @@ from homeassistant.const import (
ATTR_ENTITY_ID,
ATTR_NAME,
EVENT_AUTOMATION_TRIGGERED,
EVENT_HOMEASSISTANT_START,
EVENT_HOMEASSISTANT_STARTED,
STATE_OFF,
STATE_ON,
)
@@ -700,6 +700,7 @@ async def test_initial_value_on(hass):
assert automation.is_on(hass, "automation.hello")
await hass.async_start()
await hass.async_block_till_done()
hass.bus.async_fire("test_event")
await hass.async_block_till_done()
assert len(calls) == 1
@@ -822,7 +823,7 @@ async def test_automation_not_trigger_on_bootstrap(hass):
await hass.async_block_till_done()
assert len(calls) == 0
hass.bus.async_fire(EVENT_HOMEASSISTANT_START)
hass.bus.async_fire(EVENT_HOMEASSISTANT_STARTED)
await hass.async_block_till_done()
assert automation.is_on(hass, "automation.hello")