mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 16:57:53 +00:00
Group component now supports lists in the config
This commit is contained in:
parent
004d4ed123
commit
80ffe74af6
@ -56,8 +56,13 @@ device_sun_light_trigger:
|
||||
# A comma seperated list of states that have to be tracked as a single group
|
||||
# Grouped states should share the same type of states (ON/OFF or HOME/NOT_HOME)
|
||||
group:
|
||||
living_room: light.Bowl,light.Ceiling,light.TV_back_light
|
||||
children: device_tracker.child_1,device_tracker.child_2
|
||||
living_room:
|
||||
- light.Bowl
|
||||
- light.Ceiling
|
||||
- light.TV_back_light
|
||||
children:
|
||||
- device_tracker.child_1
|
||||
- device_tracker.child_2
|
||||
|
||||
process:
|
||||
# items are which processes to look for: <entity_id>: <search string within ps>
|
||||
|
@ -101,7 +101,11 @@ def get_entity_ids(hass, entity_id, domain_filter=None):
|
||||
def setup(hass, config):
|
||||
""" Sets up all groups found definded in the configuration. """
|
||||
for name, entity_ids in config.get(DOMAIN, {}).items():
|
||||
setup_group(hass, name, entity_ids.split(","))
|
||||
# Support old deprecated method - 2/28/2015
|
||||
if isinstance(entity_ids, str):
|
||||
entity_ids = entity_ids.split(",")
|
||||
|
||||
setup_group(hass, name, entity_ids)
|
||||
|
||||
return True
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user