Rule Machine Help

Hey all, I’m trying to figure out rule machine for a mildly complex rule in our bedroom. In the evening we have a lamp that auto turns on at sunset to level 3. This works great for mild lighting and keeping the house from being completely dark.

What I’m trying to do is create a rule that brightens the room when someone walks in and trips a motion sensor there. Ideally the lights would go back to normal when the motion sensor detects motion has stopped. I created 2 rules for this, and I’m attaching screenshots of the rules. Even when all conditions are met (which they aren’t in the screen shots), the rules don’t fire on their own. If I manually run the actions everything does what I would expect. Any advice you can offer would be greatly appreciated. Thanks!

If you want the actions to run based in motion, then you need motion as a trigger. There are several basic motion lighting examples in the docs, which you might be able to use as a starting point. Conditionals in your actions don't cause anything to happen if their truth evaluation changes, so right now your actions will only run when the dimmer becomes a certain level due to a physical change. It sounds like that isn't what you want.

But: with motion as a trigger instead, that will make it difficult to determine whether the current level was the result of a physical action. If you still need to do this, there are certainly ways you could track it (e.g., with another rule and a global variable; you can't access it as part of a condition as-is). But I'm not sure you need to: I assume just raising the level on motion and putting it back down some time after motion stops would be what you want? If so, the examples in the docs would be what you want, except "Dim" instead of "Off" after inactivity.

1 Like

Thanks for the suggestions- I’ll take a look at those docs. I tried to find some training stuff but was coming up short in my searches. I really appreciate the help!

See if Lights On Motion Plus will work for you.

I do this in simple lighting with 3 rules. One to turn on. One to turn off if not dark and another to dim to a set level if dark.

If you need exact screenshots let me know and I can try to post them later tonight

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