Basic Motion Rule

I converted a Rule Machine rule into a basic rule as I wanted to simplify things and I cannot figure out why it is not working. Below is a screenshot of the rule and of the logs. The light turns on when motion happens, however the action to turn it off never kicks off. Any recommendations?

Wouldn't it be even simpler to use the motion and mode lighting app?


I had tried that a long while back and it did not offer the delayed turning off. It looks like that is not in there so I will give it a shot. Thanks!

I would still like to understand if my basic rule has a logic error or if I am missing something.

I don't see anything wrong with your rule, though off the top of my head I'm not sure if selecting multiple sensors gives you an "any" or an "all" evaluation--guessing it might be an "any," which would explain why they don't need to all become active to turn the light on, and in which case the lights could turn off sooner than you expect.

But that's a different issue. Looking at your logs, I don't see any time where you waited the full 10 minutes for the lights to turn off. You got to about 8 minutes once (at 7:36 AM), then must have gone into the app and hit "Done" again (maybe you checked on or modified something?). That would re-initialize the app, erasing any schedules or device/event subscriptions created in the course of running your rule (like you'd get for your delayed "off"). This happened again at 8:26 after only about 2 minutes. I'd try once where you're sure you waited 10 minutes, or try a lower delay like 1 minute for testing.

That being said, the Motion Lighting app--as recommended above--can definitely handle this, and it's always had the "delay" option you're looking for. Simple Automation Rules could, too, though I believe selecting multiple senors there gives you an "any" situation, so wouldn't work for the turn-off side of things in the expected way (at least the current version; it actually used to work differently, and I asked about this once but never got an answer).

Thanks. I tried the motion app and it worked great. However, I have other rooms where I am not turning on a light when motion occurs, I am turning off a light when motion stops occurring. I did a quick test and it does not see to trigger the rule since I don't have anything to turn on. Is this possible?


If I understand the use case correctly, you want to use a switch to turn ON a light but a motion sensor to turn it OFF when motion is inactive? I'm not sure motion & mode will do that... could do it in RM for sure.

Whilst I agree it is nice to have things as simple/efficient as possible, why not leave things using RM. It's working OK and it will save you a lot of head scratching.

I can move back to RM to handle these for sure. I normally keep my complex rules in there and this doesn't seem like it would need that complexity. You are correct, that this is switch to turn on and turn off when no motion. I have the below Basic Rule which should do this, I just don't see why it wouldn't work. I have this paused currently as I was testing.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.