I have an event that will turn on the lights on the porch if the door opens after dark and will turn them off again 30 seconds after the door is closed again. So far so good.
I've also got a ring doorbell that i use via MQTT to trigger motion and if the motion is after dark then the porch light goes on for 30 seconds and then turns off.
I then discovered that if someone triggers motion and then i answer the door the light will turn off after 30 seconds so i changed the off event to check if the door was open.
I.e. trigger the porch light off event which checks if the door and only turn off the light when the door is closed. Closing the door will trigger turning off the light event after 30 seconds.

The problem is that this event turns off the light regardless of whether the AND IF condition is satisfied. Am i missing something here as to my mind this should not turn off the lights when the sensor is set to open?
I've also got a ring doorbell that i use via MQTT to trigger motion and if the motion is after dark then the porch light goes on for 30 seconds and then turns off.
I then discovered that if someone triggers motion and then i answer the door the light will turn off after 30 seconds so i changed the off event to check if the door was open.
I.e. trigger the porch light off event which checks if the door and only turn off the light when the door is closed. Closing the door will trigger turning off the light event after 30 seconds.
The problem is that this event turns off the light regardless of whether the AND IF condition is satisfied. Am i missing something here as to my mind this should not turn off the lights when the sensor is set to open?
Comment