Fix automations listening to HOMEASSISTANT_START (#6936)
* Fire EVENT_HOMEASSISTANT_START automations off right away while starting * Actually have core state be set to 'starting' during boot * Fix correct start implementation * Test and deprecate event automation platform on start * Fix doc strings * Remove shutting down exception * More strict when to mark an instance as finished * Add automation platform to listen for start/shutdown * When we stop we should wait till it's all done * Fix testing * Fix async bugs in tests * Only set UVLOOP when hass starts from CLI * This hangs normal asyncio event loop * Clean up Z-Wave node entity test
This commit is contained in:
parent
289d6b6605
commit
29f385ea76
23 changed files with 258 additions and 97 deletions
|
@ -65,7 +65,7 @@ class TestFFmpegNoiseSetup(object):
|
|||
entity = self.hass.states.get('binary_sensor.ffmpeg_noise')
|
||||
assert entity.state == 'off'
|
||||
|
||||
mock_ffmpeg.call_args[0][2](True)
|
||||
self.hass.add_job(mock_ffmpeg.call_args[0][2], True)
|
||||
self.hass.block_till_done()
|
||||
|
||||
entity = self.hass.states.get('binary_sensor.ffmpeg_noise')
|
||||
|
@ -130,7 +130,7 @@ class TestFFmpegMotionSetup(object):
|
|||
entity = self.hass.states.get('binary_sensor.ffmpeg_motion')
|
||||
assert entity.state == 'off'
|
||||
|
||||
mock_ffmpeg.call_args[0][2](True)
|
||||
self.hass.add_job(mock_ffmpeg.call_args[0][2], True)
|
||||
self.hass.block_till_done()
|
||||
|
||||
entity = self.hass.states.get('binary_sensor.ffmpeg_motion')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue