Update demo.py

This commit is contained in:
Karen Goode 2016-02-26 18:12:03 -08:00
parent cbd69583bd
commit 712ba65d26

View File

@ -62,18 +62,30 @@ def setup(hass, config):
lights = sorted(hass.states.entity_ids('light')) lights = sorted(hass.states.entity_ids('light'))
switches = sorted(hass.states.entity_ids('switch')) switches = sorted(hass.states.entity_ids('switch'))
media_players = sorted(hass.states.entity_ids('media_player')) media_players = sorted(hass.states.entity_ids('media_player'))
group.Group(hass, 'living room', [lights[1], switches[0], 'input_select.living_room_preset','rollershutter.living_room_window', group.Group(hass, 'living room', [
media_players[1],'scene.romantic_lights']) lights[1], switches[0], 'input_select.living_room_preset',
'rollershutter.living_room_window', media_players[1],
'scene.romantic_lights'])
group.Group(hass, 'bedroom', [lights[0], switches[1], media_players[0]]) group.Group(hass, 'bedroom', [lights[0], switches[1], media_players[0]])
group.Group(hass, 'kitchen', [lights[2], 'rollershutter.kitchen_window','lock.kitchen_door']) group.Group(hass, 'kitchen', [
group.Group(hass, 'doors', ['lock.front_door','lock.kitchen_door','garage_door.right_garage_door', 'garage_door.left_garage_door']) lights[2], 'rollershutter.kitchen_window', 'lock.kitchen_door'])
group.Group(hass, 'automations', ['input_select.who_cooks','input_boolean.notify', ]) group.Group(hass, 'doors', [
group.Group(hass, 'people', ['device_tracker.demo_anne_therese','device_tracker.demo_home_boy', 'device_tracker.demo_paulus',]) 'lock.front_door', 'lock.kitchen_door',
group.Group(hass, 'thermostats', ['thermostat.nest', 'thermostat.thermostat']) 'garage_door.right_garage_door', 'garage_door.left_garage_door'])
group.Group(hass, 'downstairs', ['group.living_room', 'group.kitchen', 'scene.romantic_lights', 'rollershutter.kitchen_window', group.Group(hass, 'automations', [
'rollershutter.living_room_window', 'group.doors','thermostat.nest', 'input_select.who_cooks', 'input_boolean.notify', ])
group.Group(hass, 'people', [
'device_tracker.demo_anne_therese', 'device_tracker.demo_home_boy',
'device_tracker.demo_paulus'])
group.Group(hass, 'thermostats', [
'thermostat.nest', 'thermostat.thermostat'])
group.Group(hass, 'downstairs', [
'group.living_room', 'group.kitchen',
'scene.romantic_lights', 'rollershutter.kitchen_window',
'rollershutter.living_room_window', 'group.doors', 'thermostat.nest',
], view=True) ], view=True)
group.Group(hass, 'Upstairs', ['thermostat.thermostat', 'group.bedroom', group.Group(hass, 'Upstairs', [
'thermostat.thermostat', 'group.bedroom',
], view=True) ], view=True)
# Setup scripts # Setup scripts
@ -118,10 +130,11 @@ def setup(hass, config):
#Set up input select #Set up input select
bootstrap.setup_component( bootstrap.setup_component(
hass, 'input_select', hass, 'input_select',
{'input_select': {'living_room_preset': {'options': ['Visitors', {'input_select':
'Visitors with kids', {'living_room_preset': {'options': ['Visitors',
'Home Alone']}, 'Visitors with kids',
'who_cooks': {'icon': 'mdi:panda', 'Home Alone']},
'who_cooks': {'icon': 'mdi:panda',
'initial': 'Anne Therese', 'initial': 'Anne Therese',
'name': 'Who cooks today', 'name': 'Who cooks today',
'options': ['Paulus', 'Anne Therese']}}}) 'options': ['Paulus', 'Anne Therese']}}})
@ -129,9 +142,8 @@ def setup(hass, config):
bootstrap.setup_component( bootstrap.setup_component(
hass, 'input_boolean', hass, 'input_boolean',
{'input_boolean': {'notify': {'icon': 'mdi:car', {'input_boolean': {'notify': {'icon': 'mdi:car',
'initial': False, 'initial': False,
'name': 'Notify Anne Therese is home'}}}) 'name': 'Notify Anne Therese is home'}}})
# Setup configurator # Setup configurator
configurator_ids = [] configurator_ids = []