From cbd69583bde4d058e437d422a15d32680e4f7bf6 Mon Sep 17 00:00:00 2001 From: Karen Goode Date: Fri, 26 Feb 2016 15:23:44 -0800 Subject: [PATCH 1/4] Update demo.py Update to demo site to include input_selects, notify, inline camera and two views. --- homeassistant/components/demo.py | 38 ++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/homeassistant/components/demo.py b/homeassistant/components/demo.py index f025cfd008a..a305ecea0dd 100644 --- a/homeassistant/components/demo.py +++ b/homeassistant/components/demo.py @@ -62,15 +62,18 @@ def setup(hass, config): lights = sorted(hass.states.entity_ids('light')) switches = sorted(hass.states.entity_ids('switch')) media_players = sorted(hass.states.entity_ids('media_player')) - group.Group(hass, 'living room', [ - lights[2], lights[1], switches[0], media_players[1], - 'scene.romantic_lights']) - group.Group(hass, 'bedroom', [lights[0], switches[1], - media_players[0]]) - group.Group(hass, 'Rooms', [ - 'group.living_room', 'group.bedroom', - 'scene.romantic_lights', 'rollershutter.kitchen_window', - 'rollershutter.living_room_window', + group.Group(hass, 'living room', [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, 'kitchen', [lights[2], 'rollershutter.kitchen_window','lock.kitchen_door']) + group.Group(hass, 'doors', ['lock.front_door','lock.kitchen_door','garage_door.right_garage_door', 'garage_door.left_garage_door']) + group.Group(hass, 'automations', ['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) + group.Group(hass, 'Upstairs', ['thermostat.thermostat', 'group.bedroom', ], view=True) # Setup scripts @@ -112,6 +115,23 @@ def setup(hass, config): }}, ]}) + #Set up input select + bootstrap.setup_component( + hass, 'input_select', + {'input_select': {'living_room_preset': {'options': ['Visitors', + 'Visitors with kids', + 'Home Alone']}, + 'who_cooks': {'icon': 'mdi:panda', + 'initial': 'Anne Therese', + 'name': 'Who cooks today', + 'options': ['Paulus', 'Anne Therese']}}}) + #Set up input boolean + bootstrap.setup_component( + hass, 'input_boolean', + {'input_boolean': {'notify': {'icon': 'mdi:car', + 'initial': False, + 'name': 'Notify Anne Therese is home'}}}) + # Setup configurator configurator_ids = [] From 712ba65d26855e981552e6c5a664f8063ddb9ab4 Mon Sep 17 00:00:00 2001 From: Karen Goode Date: Fri, 26 Feb 2016 18:12:03 -0800 Subject: [PATCH 2/4] Update demo.py --- homeassistant/components/demo.py | 46 ++++++++++++++++++++------------ 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/homeassistant/components/demo.py b/homeassistant/components/demo.py index a305ecea0dd..9d4bde02866 100644 --- a/homeassistant/components/demo.py +++ b/homeassistant/components/demo.py @@ -62,18 +62,30 @@ def setup(hass, config): lights = sorted(hass.states.entity_ids('light')) switches = sorted(hass.states.entity_ids('switch')) 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', - media_players[1],'scene.romantic_lights']) + group.Group(hass, 'living room', [ + 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, 'kitchen', [lights[2], 'rollershutter.kitchen_window','lock.kitchen_door']) - group.Group(hass, 'doors', ['lock.front_door','lock.kitchen_door','garage_door.right_garage_door', 'garage_door.left_garage_door']) - group.Group(hass, 'automations', ['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', + group.Group(hass, 'kitchen', [ + lights[2], 'rollershutter.kitchen_window', 'lock.kitchen_door']) + group.Group(hass, 'doors', [ + 'lock.front_door', 'lock.kitchen_door', + 'garage_door.right_garage_door', 'garage_door.left_garage_door']) + group.Group(hass, 'automations', [ + '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) - group.Group(hass, 'Upstairs', ['thermostat.thermostat', 'group.bedroom', + group.Group(hass, 'Upstairs', [ + 'thermostat.thermostat', 'group.bedroom', ], view=True) # Setup scripts @@ -118,10 +130,11 @@ def setup(hass, config): #Set up input select bootstrap.setup_component( hass, 'input_select', - {'input_select': {'living_room_preset': {'options': ['Visitors', - 'Visitors with kids', - 'Home Alone']}, - 'who_cooks': {'icon': 'mdi:panda', + {'input_select': + {'living_room_preset': {'options': ['Visitors', + 'Visitors with kids', + 'Home Alone']}, + 'who_cooks': {'icon': 'mdi:panda', 'initial': 'Anne Therese', 'name': 'Who cooks today', 'options': ['Paulus', 'Anne Therese']}}}) @@ -129,9 +142,8 @@ def setup(hass, config): bootstrap.setup_component( hass, 'input_boolean', {'input_boolean': {'notify': {'icon': 'mdi:car', - 'initial': False, - 'name': 'Notify Anne Therese is home'}}}) - + 'initial': False, + 'name': 'Notify Anne Therese is home'}}}) # Setup configurator configurator_ids = [] From 2a01b09d31dc6c828385b9f8df57c743214115d6 Mon Sep 17 00:00:00 2001 From: Karen Goode Date: Fri, 26 Feb 2016 18:25:39 -0800 Subject: [PATCH 3/4] Update demo.py --- homeassistant/components/demo.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/demo.py b/homeassistant/components/demo.py index 9d4bde02866..331201a6e0f 100644 --- a/homeassistant/components/demo.py +++ b/homeassistant/components/demo.py @@ -135,9 +135,9 @@ def setup(hass, config): 'Visitors with kids', 'Home Alone']}, 'who_cooks': {'icon': 'mdi:panda', - 'initial': 'Anne Therese', - 'name': 'Who cooks today', - 'options': ['Paulus', 'Anne Therese']}}}) + 'initial': 'Anne Therese', + 'name': 'Who cooks today', + 'options': ['Paulus', 'Anne Therese']}}}) #Set up input boolean bootstrap.setup_component( hass, 'input_boolean', From 02faefdab3b2172a64e7adf20a025d5135944c95 Mon Sep 17 00:00:00 2001 From: Karen Goode Date: Fri, 26 Feb 2016 18:43:50 -0800 Subject: [PATCH 4/4] Update demo.py --- homeassistant/components/demo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/demo.py b/homeassistant/components/demo.py index 331201a6e0f..3a70be00b38 100644 --- a/homeassistant/components/demo.py +++ b/homeassistant/components/demo.py @@ -127,7 +127,7 @@ def setup(hass, config): }}, ]}) - #Set up input select + # Set up input select bootstrap.setup_component( hass, 'input_select', {'input_select': @@ -138,7 +138,7 @@ def setup(hass, config): 'initial': 'Anne Therese', 'name': 'Who cooks today', 'options': ['Paulus', 'Anne Therese']}}}) - #Set up input boolean + # Set up input boolean bootstrap.setup_component( hass, 'input_boolean', {'input_boolean': {'notify': {'icon': 'mdi:car',