- id: erster_kommt_nach_hause
alias: Erste Person kommt nach Zuhause
initial_state: on
trigger:
- platform: state
entity_id: group.alle_personen
to: 'home'
action:
- .....
And one for leaving home:
- id: letzter_verlasst_zuhause
alias: Letzte Person verlässt Zuhause
initial_state: on
trigger:
- platform: state
entity_id: group.alle_personen
from: 'home'
action:
- .....
This is working.
But if I drive and touch the border of the home zone, this automation are triggering. First the coming home automation and shortly after the leaving home automation.
Is there a way that this automations only trigger, if I am at least one minute inside/outside this zone?
Thanks @tom_l for your answer.
This would only work for the coming home automation.
This don‘t work for the leaving home automation.
The option for requires to: state
Also the automation would trigger every time I’m touching the border of the zone +1 minute.
alias: "Otwórz bramę gdy samochód wjeżdża do strefy Brzezie"
initial_state: true
trigger:
platform: zone
entity_id: device_tracker.opel
zone: zone.brzezie
# Event is either enter or leave
event: enter # or "leave"
action:
service: switch.turn_on
data_template:
entity_id: switch.gate