I followed the new person steps.
I did the searching.
I tired many iterations.
I’m stuck.
I’m trying to setup an automation that turns off a switch when all 4 people leave (Life360) the zone (my house) and turns the same switch back on if any one person returns to the zone (my house). The switch controls the hot water heater. Trying to save a few $$$$.
Any guidance is GREATLY appreciated.(edited)
The typical way is to use a group. Either create a group with the device_tracker
entities, or just use the automatically created one: group.all_devices
. The group will be home
whenever anyone is home, and will be not_home
when nobody is home. Then:
- trigger:
platform: state
entity_id: group.all_devices
from: home
action:
service: switch.turn_off
entity_id: switch.xxx
- trigger:
platform: state
entity_id: group.all_devices
to: home
action:
service: switch.turn_on
entity_id: switch.xxx
Giving that a shot now. Thank you for the help!