I have a Vera Plus using UI7. For the scene in question I have a sensor on my front courtyard gate which detects when its open/closed. I also have a z-wave switch which controls the courtyard lights.
Years ago I created a scene which turns on the lights when the gate is opened, waits 10 minutes and then turns the lights off. This scene worked fine until ~6 months ago when it would properly turn the lights one but not always tun them off - now maybe works 30-50% of the time.
A few months ago I added a second condition to try and turn the lights off a second time after 20 minutes. This didn’t seem make it work any better.