Motion sensor and lights duration


#1

Hi there,

I am having a hard time coming up with a certain rule.
I hope the community can help me as where to start

Basically this is what i want to achieve:

If no motion detected in the past 30 sec = Turn off lights
however if :
Motion sensor active for more than 5 min = Lights does not turn off for at least 2 min
Motion sensor active for more than 3 min = Lights does not turn off for at least 1 min
Motion sensor active for less than1 min = Lights does not turn off for at least 30 sec

I am guessing that i could put the time duration into a variable?

If any of you have something similar, please share


#2

Take a look at this beauty

But you can do this with if motion active in past x min as well and group them in a if/then chain or perhaps a select statement