Rule Machine 4 - Actions for False

I have a rule in v3 that turns my garage lights on if there is motion on 4 sensors. This rule is set to turn them off after a delay of 5 minutes if there is no motion. I am having trouble in the new rule machine v4 finding this capability. Is there a "select actions for false" capability?

There aren't "Actions for True" and "Actions for False" anymore because you don't have a "rule" defined by conditions in Rule 4.0 anymore, either, so there is no concept of "true" or "false" evaluation that would cause the appropriate set of actions to run. Instead, the (only) "Actions" section will run whenever the trigger fires, and there--in the actions section--is where you can fork your actions, generally with conditionals (IF statements), to do what you want. In many cases this also means you'll want your trigger to be something like "motion changes" so you can test for "IF motion active..." and "ELSE" (i.e., motion inactive) in the actions section itself.

If you just want to cut to the chase, Bruce had a very similar rule in the new docs for Rule 4.0. The screenshot is here: https://community.hubitat.com/uploads/default/original/3X/2/8/28ec357b8c94548fbfd57f38ee73620815d4edff.png. But for a better understanding, I'd recommend reading the whole thread, [Released] Rule 4.0. The way "cancel" works changed, too, since with just a trigger and no rule, there is no such thing as "truth change." This is demonstrated in the screenshot of the rule I linked to, but it's explained more generally in the documentation thread I also linked to.

Hope this helps!

(PS - While learning RM is great, if all you want is motion-based lighting, the stock Motion Lighting app can handle this--and a bit more--quite easily with less work and thinking on the user's part.)

1 Like

Thank you! Is this the equivalent in the Motion Lighting app?

Looks good to me!

Motion Lighting has a few "extra" options you could use too if any are appealing, like sensors that would only keep the lights on but not turn them on ("Additional motion sensors to keep lights on"), which may be useful if some of your sensors point directions where they might catch movement that isn't necessarily in the desired area while others would still cover cases where you want the lights to turn on. Just mentioning that since you have a lot of sensors selected, which is certainly no problem if that's what you want--just pointing out one of many neat options buried in the app, many of which came from user requests in the past. :slight_smile:

Nice. This seems to be working and oddly is faster to turn on the lights too! Thank you.

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