Lobby lamp automation - help

Hey guys, I need your help with something.

I used a blueprint for LED light automation in my office. It works like this: when motion is detected, the lights turn on. If there’s no motion for a certain amount of time (let’s say 30 seconds), the lights turn off.

I’d like to use the same blueprint for the lobby lamp, but it’s a bit trickier. The lobby lamp can change its color based on the on/off input between 3 seconds.

So, what I want to achieve is: when motion is detected, the lamp turns on. It waits for 300 seconds. If there’s still motion, it restarts the automation. (This should be the same as the blueprint.)

The problem is that when the lamp turns off, someone just steps in, and it turns on again, but with a different color. So, it needs to wait at least 3 seconds before turning on again.

Can you help me figure out how to do this? If motion is detected, the lamp should turn on. It should wait for 300 seconds. If there’s still motion, it should turn off. If there’s a new motion when the lamp turns off within 5 seconds of turning off, it should wait for 3 seconds before turning on again.

Many thanks in advance,

Hello cisco,

Add a 4 second delay as the last action in the blueprint. (That always runs)

Thanks for your answer, but if I add that it will always do a 4sec delay before a turn-on, am I right?

Just to clarify, the first time the motion has been detected I want to turn on the lamp instantly. I just want a delay when the automation restarts because of an instant motion that happened after a turn-off.

Sorry if I did not write it correctly.

You put the delay at the end, after your automation is over. The mode:single will not allow any a new one to start until after the first one is done.
If normal running you will never know it is happening. It will only do something visible if the automation tries to run within the four seconds after it stops at which time it will prevent it from running, as your original question was.