I have 2 timers to trigger a switch off. This is all for my garage which is also my main gate entrance. Timers are triggered only after 10pm. First timer is triggered by a motion sensor if someone goes home after 10pm which turns off the switch after 40 secs. The second timer is triggered by geolocation if someone arrives from car which turns off the switch after 7 minutes: these are in my config yaml.
timer:
bhaussala:
duration: 00:05:00
garage:
duration: 00:00:40
goingingarage:
duration: 00:07:00
The going in garage is longer than 40 seconds but it is triggered first upon arriving home. But still upon trigger of the motion sensor the light gets turn off by the switch because the timer is lesser than 7 minutes.
these are my automation configuration.
- alias: Turn on Garage if there is movement after 10 PM
trigger:
- platform: state
entity_id: binary_sensor.garage_motion, binary_sensor.2nd_floor_to_garage_motion
to: 'on'
condition:
- condition: time
after: '22:00:00'
before: 05:30:00
weekday:
- mon
- tue
- wed
- thu
- fri
- sat
- sun
action:
- service: homeassistant.turn_on
data:
entity_id:
- switch.garage
- service: timer.start
data:
entity_id: timer.garage
id: e8cc3c72d1234ec9b76e75b77d43da45
- alias: Turn Off Garage 40 Seconds after trigger
trigger:
- platform: event
event_type: timer.finished
event_data:
entity_id: timer.garage
condition:
- condition: time
after: '22:00:00'
before: 05:34:00
weekday:
- mon
- tue
- wed
- thu
- fri
- sat
- sun
action:
- service: homeassistant.turn_off
data:
entity_id:
- switch.garage
id: bc8e4560c8dc49a6ab0e149a198f1235
- alias: Turn Off Garage 7 minutes after trigger
trigger:
- platform: event
event_type: timer.finished
event_data:
entity_id: timer.goingingarage
condition:
- condition: time
after: '22:00:00'
before: 05:34:00
weekday:
- mon
- tue
- wed
- thu
- fri
- sat
- sun
action:
- service: homeassistant.turn_off
data:
entity_id:
- switch.garage
id: 0b6e1bb477404f2d8864f4b4d4046e9f
- id: '1628342634450'
alias: Turn on the lights when going home after 10 P.M.
description: ''
trigger:
- platform: zone
entity_id: device_tracker.itel_p682lp
zone: zone.home
event: enter
condition:
- condition: time
after: '22:00:00'
before: 05:45:00
action:
- service: homeassistant.turn_on
target:
entity_id:
- switch.garage
data: {}
- service: timer.start
data:
entity_id: timer.goingingarage
Is there a way to disable one timer if the other event is triggered? Anyone can shed light or point me to somewhere else I can start with? Thank you in advance!