Yesterday an automation functioned differently than expected.
The automation is as follows:
- id: Garage_Open_Arrival_Automation
alias: Garage_Open_Arrival_Automation
description: ""
trigger:
- entity_id: device_tracker.iphone_of_me
event: enter
platform: zone
zone: zone.home
condition:
- condition: state
entity_id: binary_sensor.garage_door_sensor
state: "off"
- condition: state
entity_id: input_boolean.arriving_person_boolean
state: "on"
- condition: and
conditions:
- condition: state
entity_id: binary_sensor.alarm_arm
state: "off"
- condition: state
entity_id: binary_sensor.alarm_sleep
state: "off"
- condition: state
entity_id: binary_sensor.alarm_stay
state: "off"
action:
- data: {}
service: script.garage_door_open_script
So what was the case, according to my history:
- The garage_door_open_script got executed and is only used in my code in the above automation
- The automation did not get triggered
- the arriving_person_boolean was on, the garage_door_sensor was closed and alarm_arm was off, alarm_sleep was off and alarm_stay was on
So, the condition should have failed (alarm_stay was on), and the automation should not have triggered.
The automation appears not to have triggered in the history.
However, the script got called and my garage door opened (with the alarm on…).
So… I’m not sure what happened. Any help in how to debug this?
Edit: so my automation did get triggered if I look in the logbook - it appears my conditions succeeded, which should not have happened since alarm_stay was “on”. Or I am misunderstanding it.