Back Alive!

This commit is contained in:
Mahasri Kalavala
2019-04-17 18:46:06 -04:00
parent 929e0b336e
commit 2a0dd39795
255 changed files with 137143 additions and 0 deletions

10
python_scripts/peopleathome.py Executable file
View File

@@ -0,0 +1,10 @@
home = 0
for entity_id in hass.states.entity_ids('device_tracker'):
state = hass.states.get(entity_id)
if state.state == 'home':
home = home + 1
hass.states.set('sensor.people_home', home, {
'unit_of_measurement': 'people',
'friendly_name': 'People home'
})