mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Readd setting up groups with comma seperated list
This commit is contained in:
parent
0901ed4659
commit
fc6d7db81b
@ -103,6 +103,8 @@ def get_entity_ids(hass, entity_id, domain_filter=None):
|
|||||||
def setup(hass, config):
|
def setup(hass, config):
|
||||||
""" Sets up all groups found definded in the configuration. """
|
""" Sets up all groups found definded in the configuration. """
|
||||||
for name, entity_ids in config.get(DOMAIN, {}).items():
|
for name, entity_ids in config.get(DOMAIN, {}).items():
|
||||||
|
if isinstance(entity_ids, str):
|
||||||
|
entity_ids = entity_ids.split(",")
|
||||||
setup_group(hass, name, entity_ids)
|
setup_group(hass, name, entity_ids)
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
@ -199,7 +199,7 @@ class TestComponentsGroup(unittest.TestCase):
|
|||||||
self.hass,
|
self.hass,
|
||||||
{
|
{
|
||||||
group.DOMAIN: {
|
group.DOMAIN: {
|
||||||
'second_group': (self.group_entity_id, 'light.Bowl')
|
'second_group': self.group_entity_id + ',light.Bowl'
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user