Hello, I want to switch off the watter heater when all person of the familly group are more than 100 km of the building, and switch on when one person is below 100km of the building.
I write a trigger but didn’t fire:
trigger:
- platform: zone
entity_id: group.family
zone: zone.100km_zone
event: leave
Can you tell me how to write the automation ?
Regards
The variable Famille is right: nobody at home from 15:09 to 19:39.
Whay the trigger didn’t fire ?
alias: "Plus de 100 km de la maison"
trigger:
- platform: zone
entity_id: group.family
zone: zone.100km_zone
event: leave
action:
- service: switch.turn_off
entity_id: switch.chauffe_eau
- service: notify.gmail
data:
title: "Home assistant warning"
message: "Thierry et Line à plus de 100 km de la maison"
Hello,
Thanks for your reply,
I can use person instead of group of course.
So for switching on the water heater it is easy: if one person is present I start the water heater.
But for switching off the water heater it is needed to have nobody at home. How can I do that ?
Is the group of device tracker a bad idea ?
If you have one trigger when person A leaves and one trigger when person B leaves.
Then condition needs to be person A not in zone, and person B not in zone.
That means both will trigger but only when the last one has left will the action be performed