Hello, I have this automation that alerts me if the patio door is left open AND there is a two or more degree temperature difference between inside the house and the outside temperature
...
trigger:
- platform: state
entity_id: binary_sensor.patio_door_sensor
to: 'on'
for:
seconds: 65
condition:
condition: state
entity_id: binary_sensor.temp_delta_greater_than_two_degrees_inside_outside
state: on
...
However, if the door is left open when the temp delta between outside and insider was less than two degrees but an hour passes and now the temp delta is greater than two degrees. The problem is the trigger is already in the ‘on’ state so the automation never fires again.
Have you considered running the automation every X minutes and having both of the binary sensors be conditions. This will force the automation to trigger. It can be resource intensive if the interval between triggering is small. I think every 5 minutes and you will be fine.
This may not give the desired results based on what your actions are doing. It will ensure that the automation will run every 5 minutes and execute actions when both conditions are true.