Motion Rule - stays inactive vs. delay

Hi there,

I’m working on a motion rule for a staircase (two lights, inside staircase and at top of stairs) – the intention is to have the two lights come on/off differently day vs night. During the day, I want the lights to stay on longer than at night (kid’s bedroom is right next to 2nd upstairs light). I’ve already got the day/night part solved by setting a variable when the location mode changes (thanks @josh).

What I’m struggling with is the trigger for when the motion is inactive. I wanted to use the ‘stays inactive’ trigger – but I put two of them in: one for 30 seconds duration, one for 2 minutes duration. Wondering if I have to set the trigger for the inactive to be ‘changes to inactive’, and then set a different delay in the actions based on using the day/night variable in the if statement?

I can turn the lights on w/out any problem, its the inactive portion I’m struggling with.


My triggers are:

My actions are:

Your idea of the delay won’t work as good as you’d expect. Since once the trigger happened, it will turn off the lights regardles of the event you might create movement again.

I’d split this into multiple rules.

Rule 1:
Trigger motion active, light on

Rule 2: trigger motion inactive 30 seconds
If IsNight = true, turn lights off, else nothing.

Rule 3: trigger motion inactive 2 minutes
If IsNight = false, turn lights off, else nothing.

Only issue I’d see is if the IsNight variable changes to true after 30 seconds, there will be no trigger. Need to think about that for a bit for a way to eliminate that.

I don’t know if it’s possible to get the state stays trigger as a variable into the flow, would be handy, so following to see if it’s possible.

Yes, I was thinking about how to work around not having the ‘task cancellation policy’ – meaning that if new motion was detected, the turning off the lights would cease.

Using the state stays as triggers will get around that.