Skip to content
Snippets Groups Projects
Commit f510ee33 authored by Paulus Schoutsen's avatar Paulus Schoutsen
Browse files

group.setup now fails gracefully if config[group] not available.

parent dc157edd
No related branches found
No related tags found
No related merge requests found
...@@ -91,7 +91,7 @@ def get_entity_ids(hass, entity_id, domain_filter=None): ...@@ -91,7 +91,7 @@ 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[DOMAIN].items(): for name, entity_ids in config.get(DOMAIN, {}).items():
entity_ids = entity_ids.split(",") entity_ids = entity_ids.split(",")
setup_group(hass, name, entity_ids) setup_group(hass, name, entity_ids)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment