mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Add scene to demo
This commit is contained in:
parent
71803658f5
commit
83d83a09b5
@ -70,6 +70,24 @@ def setup(hass, config):
|
|||||||
}]
|
}]
|
||||||
}}})
|
}}})
|
||||||
|
|
||||||
|
# Setup scenes
|
||||||
|
bootstrap.setup_component(
|
||||||
|
hass, 'scene',
|
||||||
|
{'scene': [
|
||||||
|
{'name': 'Romantic lights',
|
||||||
|
'entities': {
|
||||||
|
lights[0]: True,
|
||||||
|
lights[1]: {'state': 'on', 'xy_color': [0.33, 0.66],
|
||||||
|
'brightness': 200},
|
||||||
|
}},
|
||||||
|
{'name': 'Switch on and off',
|
||||||
|
'entities': {
|
||||||
|
switches[0]: True,
|
||||||
|
switches[1]: False,
|
||||||
|
}},
|
||||||
|
]
|
||||||
|
})
|
||||||
|
|
||||||
# Setup fake device tracker
|
# Setup fake device tracker
|
||||||
hass.states.set("device_tracker.paulus", "home",
|
hass.states.set("device_tracker.paulus", "home",
|
||||||
{ATTR_ENTITY_PICTURE:
|
{ATTR_ENTITY_PICTURE:
|
||||||
|
@ -103,7 +103,6 @@ class Scene(ToggleDevice):
|
|||||||
self.scene_config = scene_config
|
self.scene_config = scene_config
|
||||||
|
|
||||||
self.is_active = False
|
self.is_active = False
|
||||||
self.active_requested = False
|
|
||||||
self.prev_states = None
|
self.prev_states = None
|
||||||
|
|
||||||
self.hass.states.track_change(
|
self.hass.states.track_change(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user