Motion trigger if active for a period of time

Hello all,
I have been all over the boards - this is my first post as usually I can find what I need already here. What I am looking to do is set a thermostat based on motion, but only if motion is detected for more than 1min 30sec. Here's the senario:
A/C window unit on an outlet switch.
Room kept at 76 using Zooz sensor and 3rd party virtual thermostat App.
When someone is playing in the playroom, I would like the virtual thermostat to drop to 72 and cool off the room. after 30min. of inactive time, I would want to restore the 76 temp.
BUT I also don't want to run the A/C for 30min if they just run in to grab something and run out. How do I delay the rule for 2 minutes, then run if there is STILL motion or cancel if no motion?
Thanks for any guidance on this!

Motion is active

Wait for event: Motion inactive --> timeout 0:02:00
IF (Motion is active) THEN
  On: Outlet Switch

If the motion goes inactive before 2:00 then the rule will fail the IF-THEN and do nothing. If the timeout is met then the motion is still active and the IF-THEN will run the On: Outlet Switch.

1 Like

Here's a simple rule that sounds like it might work for your description:

Trigger: Motion inactive


Wait for event: motion active
Wait for event: elapsed time --> 0:01:30
Set thermostat, etc.

However, the big question here is whether your sensor constantly reports motion for the entire minute and a half or if anyone stops moving long enough for it to send an "inactive" at any point in between. In that case, the timer starts over. This doesn't really check that motion is active a minute and a half later but rather whether it stays active for a minute and a half. For kids running around a room, that would probably work. :smiley: For adults in most rooms, probably not. You can really write a rule to accommodate either case; the one I did is probably just the easiest.

1 Like