#Delay of starting automation, only if ended

1 messages · Page 1 of 1 (latest)

mellow dagger
#

Hi, I have an LED light panel, when I switch on power in 5 or less seconds after the last turn off, the light color will change. So in my automation for this light I need a delay of 5.1 seconds as minimum and maximum, but only if the light turned off less than 5.1 seconds ago.

Any ideas of how to make this. Don't want to wait every time 5 seconds, don't want too wait more than 5.1 seconds if the light turned off.

I found no way to manipulate the microcontroller of the light (everything in glue)

#

Zbminil2 is the switching device, setup as "light"

mellow dagger
#

The solution was a datetime helper, which is set as last step of the light automation. I got the idea directly after posting my question.
And as new first step I'm comparing the now() timestamp - 5.1 service vs the input helper timestamp, when not matching, I'm waiting for now() timestamp - 5.1

static marsh
#

another solution could be to trigger a 5.1 second countdown timer when turning off and waiting until it reaches zero when turning on. if the light was turned off more than 5.1 seconds ago the timer should hopefully be at zero already. i have not tested this, but i think it should work.