Rule Machine... how do I get an "AND"?

I want a rule, or automation that when there is motion and a switch is already on that switch is turned off. Can not seem to figure it out. I have it here (See picture) with Rule Machine, but I have an "OR" not an "AND". What am I messing up?
Thanks

Trigger: Motion Active
Condition: Switch Status: On
Action: Switch Status: Off

Understand that Rule Machine has the concept of a trigger, but also the concept of conditions. A trigger is something that happens (think verbs). A condition is a state of being (think adjectives). "The door just opened" is a trigger. "The door is open" is a condition.

Here's a good start for grasping the conditionals: YouTube

Ok, so I started over, where do I get a "Condition" that is exactly what I need.??
See Pic

Conditional constructs (IF/THEN/ELSE) are added as if they were actions. Check out the YouTube video referenced above.

First, you will need to add a motion start event related to your sensor in the “Select Trigger Events” section.

Then you will need to set a condition to turn off the switch if it is “on” under the “Select Actions to Run” section.

That said, would there be any harm in sending an “off” command to the switch regardless of whether it is on or off? That would eliminate the need for a condition.

Thanks guys... video was a big help.
Got it done.

2 Likes

@ginnyaction

Glad you got RM working with conditions. In the event you want to try another automation engine, there is a community app called "Event Engine" developed by @bptworld, which supports triggers based on "AND" or "OR".

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

Download the Hubitat app