i need help with home/no_home switch
im using this as a switch/detection
- platform: template
sensors:
people_home:
entity_id:
- device_tracker.WIFE
- device_tracker.KIDS
- device_tracker.HUSBAND
value_template: >-
{{ is_state('device_tracker.WIFE', 'home')
or is_state('device_tracker.KIDS', 'home')
or is_state('device_tracker.HUSBAND', 'home') }}
I need this binary switch used as my condition so that i can make an automation that will turn off all my lights when no one is home ALL DEVICE IS DISCONNECTED and turn on my light if ATLEAST ONE OF THE DEVICE IS CONNECTED/HOME; my binary switch only stays on … doesn’t turn off even if all the devices are disconnected
- alias: SHUT DOWN EVERYTHING - no one is home
trigger:
platform: state
entity_id: binary_sensor.people_home
from: 'on'
to: 'off'
action:
- service: homeassistant.turn_off
entity_id: switch.switch_5
- service: homeassistant.turn_off
entity_id: switch.switch_1
and
- alias: light (Turn on)
trigger:
platform: time
at: '19:59:59'
condition:
- condition: state
platform: state
entity_id: binary_sensor.people_home
state: 'on'
action:
- service: homeassistant.turn_on
entity_id: switch.switch_5
- service: homeassistant.turn_on
entity_id: switch.switch_1