mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Demo uses device tracker demo platform
This commit is contained in:
parent
c6b5a04312
commit
72b4212b19
@ -10,14 +10,15 @@ import homeassistant.core as ha
|
|||||||
import homeassistant.bootstrap as bootstrap
|
import homeassistant.bootstrap as bootstrap
|
||||||
import homeassistant.loader as loader
|
import homeassistant.loader as loader
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
CONF_PLATFORM, ATTR_ENTITY_PICTURE, ATTR_ENTITY_ID, ATTR_FRIENDLY_NAME)
|
CONF_PLATFORM, ATTR_ENTITY_ID)
|
||||||
|
|
||||||
DOMAIN = "demo"
|
DOMAIN = "demo"
|
||||||
|
|
||||||
DEPENDENCIES = ['introduction', 'conversation']
|
DEPENDENCIES = ['conversation', 'introduction', 'zone']
|
||||||
|
|
||||||
COMPONENTS_WITH_DEMO_PLATFORM = [
|
COMPONENTS_WITH_DEMO_PLATFORM = [
|
||||||
'switch', 'light', 'sensor', 'thermostat', 'media_player', 'notify']
|
'device_tracker', 'light', 'media_player', 'notify', 'switch', 'sensor',
|
||||||
|
'thermostat']
|
||||||
|
|
||||||
|
|
||||||
def setup(hass, config):
|
def setup(hass, config):
|
||||||
@ -110,25 +111,6 @@ def setup(hass, config):
|
|||||||
}},
|
}},
|
||||||
]})
|
]})
|
||||||
|
|
||||||
# Setup fake device tracker
|
|
||||||
hass.states.set("device_tracker.paulus", "home",
|
|
||||||
{ATTR_ENTITY_PICTURE:
|
|
||||||
"http://graph.facebook.com/297400035/picture",
|
|
||||||
ATTR_FRIENDLY_NAME: 'Paulus'})
|
|
||||||
hass.states.set("device_tracker.anne_therese", "not_home",
|
|
||||||
{ATTR_FRIENDLY_NAME: 'Anne Therese',
|
|
||||||
'latitude': hass.config.latitude + 0.002,
|
|
||||||
'longitude': hass.config.longitude + 0.002})
|
|
||||||
|
|
||||||
hass.states.set("group.all_devices", "home",
|
|
||||||
{
|
|
||||||
"auto": True,
|
|
||||||
ATTR_ENTITY_ID: [
|
|
||||||
"device_tracker.paulus",
|
|
||||||
"device_tracker.anne_therese"
|
|
||||||
]
|
|
||||||
})
|
|
||||||
|
|
||||||
# Setup configurator
|
# Setup configurator
|
||||||
configurator_ids = []
|
configurator_ids = []
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user