Reload groups (#3203)
* Allow reloading groups without restart * Test to make sure automation listeners are removed. * Remove unused imports for group tests * Simplify group config validation * Add prepare_reload function to entity component * Migrate group to use entity_component.prepare_reload * Migrate automation to use entity_component.prepare_reload * Clean up group.get_entity_ids * Use cv.boolean for group config validation
This commit is contained in:
1 parent
91028cbc13
commit
35b388edce
8 files changed
+143
-63
No files matched your search
@@ -450,6 +450,9 @@ class TestAutomation(unittest.TestCase):
|
||||
})
|
||||
assert self.hass.states.get('automation.hello') is not None
|
||||
assert self.hass.states.get('automation.bye') is None
|
||||
listeners = self.hass.bus.listeners
|
||||
assert listeners.get('test_event') == 1
|
||||
assert listeners.get('test_event2') is None
|
||||
|
||||
self.hass.bus.fire('test_event')
|
||||
self.hass.pool.block_till_done()
|
||||
@@ -462,6 +465,9 @@ class TestAutomation(unittest.TestCase):
|
||||
|
||||
assert self.hass.states.get('automation.hello') is None
|
||||
assert self.hass.states.get('automation.bye') is not None
|
||||
listeners = self.hass.bus.listeners
|
||||
assert listeners.get('test_event') is None
|
||||
assert listeners.get('test_event2') == 1
|
||||
|
||||
self.hass.bus.fire('test_event')
|
||||
self.hass.pool.block_till_done()
|
||||
|
||||
Reference in new issue
Block a user