However, re-reading the thread, it didn’t evaluate the conditions first before the entire trigger. It seemed to evaluate the conditions before the “for:” part of the trigger. I remember doing some testing at the time and I think I got the same results as him.
but now looking at that then the above proposed code wouldn’t work. unless you put a “for:” in the trigger then it might still work.
to clarify, test to see if the door goes closed for a few seconds in the trigger and keep the condition as the door open for 5 minutes to see if the automation fires.
i’m not saying in any of this that it definitely works that way and as i said i was surprised to see that result too since it contradicted my understanding at the time. however, it seemed to have been tested and confirmed at least in that scenario.
OTOH, as shown in the recent thread about the two light scenario in which the OP was trying to get either light to follow the state of the other and it didn’t work as expected for both you and the OP and it worked exactly as it should for me that here are definitely some little unexplainable glitches in the system at times.