I’m trying to do an automation for the garage lights. I want them to turn on when the door is opened, and turn them off three minutes after.
BUT, if I turn them on manually, I don’t want them turning off.
How do I set the condition for this? I’ve been looking at different conditions and I guess the one I should use is Template, but I don’t know how should I write it. For example, checking if the door has been opened in the last 3 minutes then turn the light off, else leave it on.
This is the base automation to turn the light off after three minutes, but obviously it will do it always, no matter what triggered the light on.
I’ve added an input boolean to turn on when the garage door is opened, and then I use it as condition when turning the light off. If the boolean is on, then it will turn the lights off (and the boolean with it). So if I manually turn the lights on the boolean state doesn’t change.
You could create a timer helper for the garage door lights, when the door is opened, turn the lights on then start the timer with the desired time. Turn off the lights when the timer ends. You can use a separate automation for that, but I’d put them in the same automation using trigger ID.
This also makes it easy if you ever decide you want to be able to keep the light on after it has been triggered by the door. You just create an automation to cancel the timer whenever the light is turned on.
Not exact answer on you questions but some ideas instead.
You did provide requirements instead of needs so I’m just guessing.
IMO you could try to leave timer regardless who/what triggered gate opening. I believe it might be useful for gate opened by a person too.
But I understand the need of having gate permanently open. To achieve that you can use double-press or hold of the button (or special button).