Door sensor to turn light off on delay

This was very helpful for me. I have been trying to figure out how to replace a webcore piston that I had for my garage and this put me on the right track.

I found this thread helpful for adding the virtual momentary button: [ST Edge] vEdge Creator: a virtual device generator for end users - Devices & Integrations / Community Created Device Types - SmartThings Community

My situation is even more complex as I have two motion sensors in the garage in addition to the contact sensor on the door and I want to have any of them keep the light on. The answer is really the same though.

The one thing that I found that was hanging me up is I had to reverse the precondition and trigger condition.

I had to make the precondition being my door sensor closed and the trigger condition the momentary switch off. I feel like the precondition is a safety net and not 100% needed but I am not sure yet.

Thanks again both for the question and answer!