Remove service helper (6) (#16920)
* Update automation * Update group * Async_create_task
This commit is contained in:
1 parent
70b901017f
commit
f879ac0993
7 files changed
+95
-97
No files matched your search
@@ -368,7 +368,7 @@ class TestComponentsGroup(unittest.TestCase):
|
||||
}}}):
|
||||
with patch('homeassistant.config.find_config_file',
|
||||
return_value=''):
|
||||
group.reload(self.hass)
|
||||
common.reload(self.hass)
|
||||
self.hass.block_till_done()
|
||||
|
||||
assert sorted(self.hass.states.entity_ids()) == \
|
||||
@@ -409,7 +409,7 @@ class TestComponentsGroup(unittest.TestCase):
|
||||
|
||||
# The old way would create a new group modify_group1 because
|
||||
# internally it didn't know anything about those created in the config
|
||||
group.set_group(self.hass, 'modify_group', icon="mdi:play")
|
||||
common.set_group(self.hass, 'modify_group', icon="mdi:play")
|
||||
self.hass.block_till_done()
|
||||
|
||||
group_state = self.hass.states.get(
|
||||
@@ -442,7 +442,7 @@ def test_service_group_set_group_remove_group(hass):
|
||||
'group': {}
|
||||
})
|
||||
|
||||
group.async_set_group(hass, 'user_test_group', name="Test")
|
||||
common.async_set_group(hass, 'user_test_group', name="Test")
|
||||
yield from hass.async_block_till_done()
|
||||
|
||||
group_state = hass.states.get('group.user_test_group')
|
||||
@@ -450,7 +450,7 @@ def test_service_group_set_group_remove_group(hass):
|
||||
assert group_state.attributes[group.ATTR_AUTO]
|
||||
assert group_state.attributes['friendly_name'] == "Test"
|
||||
|
||||
group.async_set_group(
|
||||
common.async_set_group(
|
||||
hass, 'user_test_group', view=True, visible=False,
|
||||
entity_ids=['test.entity_bla1'])
|
||||
yield from hass.async_block_till_done()
|
||||
@@ -463,7 +463,7 @@ def test_service_group_set_group_remove_group(hass):
|
||||
assert group_state.attributes['friendly_name'] == "Test"
|
||||
assert list(group_state.attributes['entity_id']) == ['test.entity_bla1']
|
||||
|
||||
group.async_set_group(
|
||||
common.async_set_group(
|
||||
hass, 'user_test_group', icon="mdi:camera", name="Test2",
|
||||
control="hidden", add=['test.entity_id2'])
|
||||
yield from hass.async_block_till_done()
|
||||
@@ -479,7 +479,7 @@ def test_service_group_set_group_remove_group(hass):
|
||||
assert sorted(list(group_state.attributes['entity_id'])) == sorted([
|
||||
'test.entity_bla1', 'test.entity_id2'])
|
||||
|
||||
group.async_remove(hass, 'user_test_group')
|
||||
common.async_remove(hass, 'user_test_group')
|
||||
yield from hass.async_block_till_done()
|
||||
|
||||
group_state = hass.states.get('group.user_test_group')
|
||||
|
||||
Reference in new issue
Block a user