Delay Motion ON if switch was manually turned off

For a certain time period? And only when you manually turn them off? Again, you are restating your original request which is really not clarifying anything.

Do you want to wait for: A) A set fixed amount of time B) Until all motion is inactive in the area (i.e. a room with multiple sensors)

If the first answer is A, then do you want this A) only when manually turned off B) whenever the lights turn off.

It would be much easier if you did it the way I did. As soon as motion is detected in the room and your "rule" turns the lights on you disable the automation. Then, you do not re-enable the automation until the lights are off and no motion is active. That occurs either after the 10 minute timeout if the lights are on or immediately if lights are off when motion goes inactive. I used to have this EXACT rule. Give me a moment to find it.

A & A
UPDATE: but I am also fine with B & A. Both seem to fix the issue.
Thanks for the help!

I still maintain that the logic in post 2 is the simplest way to do that. But I'm biased. :slight_smile:

1 Like

Okay...then I won't take the time to look for my rule...because that is not what i did. I also don't think it is going to work the way you want. But you don't seem very open to different approaches to solving the problem, so I will just let you figure it out.

Your rule has a 10 minute delay after physical off. That means that the rule won't allow motion active for 10 minutes....not 10 seconds. And again, you are not considering the timeout of the motion sensors involved. using a timeout is introducing more timers into an automation that is already stuffed with them.

I’m open to any solution that will resolve the issue. B & A also seems to do the job. I just thought A & A would be simpler.

Yes, you could change the timer to something shorter.

It doesn't matter, actually. Since you are turning it OFF and then ignoring and motion readings for the fixed time, it matters not at all what the reset is. If it was already active at manual off time, so what? If it becomes active during the delay timer period, so what? The rule does the same thing either way - the lights stay off. Which is what the OP asked for.

In my opinion, it is simpler. But that is a subjective opinion, and not an absolute truth. :slight_smile: Anyway, there are almost infinite ways to do it. Play around and do it whichever way you prefer. If it works for you, then that's the right way. :+1:

1 Like

No...as i said...you're introducing another timer into the equation. They will all have to play nicely together and that makes it a lot more complicated. If your 10 seconds timeout is shorter than your motion sensor timeout, then your lights will come back on after your 10 second timeout.

I will write out the rule I used...just give me a second....

Trigger:  Motion A or B Changing

Action: 

If motion A or B active:
     Cancel delayed actions.
     If Enable is true
          Turn on lights to setting you want
           Set Enable to False
     End-If
Else
     If lights are On
          delay actions by 10 minutes cancelable
          Turn off lights
     End-If
     Set enable to true
End-If

This allows you to only turn the lights on when Enable (local Variable) is true. Also, when both sensors are inactive, if the lights are on, it waits 10 minutes. If not, it sets enable to true immediately. You could add a delayed action before the Set Enable to true if your motion sensors have a VERY short timeout (like less than 10 seconds) which I think the Konnected ones do. But that is much easier than trying to use timers. So, in that case it would look like this:

Trigger:  Motion A or B Changing

Action: 

If motion A or B active:
     Cancel delayed actions.
     If Enable is true
          Turn on lights to setting you want
           Set Enable to False
     End-If
Else
     If lights are On
          delay actions by 10 minutes cancelable
          Turn off lights
     End-If
     Delay actions for 10 seconds cancelable
     Set enable to true
End-If

But this would mean that the lights would be off and remain off when the second delay of 10 seconds was canceled. You should only use that if your motion sensors have extremely short timeouts.

1 Like

Thanks @Ryan780 & @JasonJoel for the help! I’ll try this out and will report back.

1 Like

Good luck!

1 Like