How do I do AND with the trigger conditions

I only see how to do ANY and OR, but cant figure hout how to make sure both trigger conditions are met......i need two motion detectors to see movement before something else is triggered. Thanks.

Short answer is that you can't. You can try @bptworld's Event Engine though, which supports AND triggers.

You might try Motion Zone to aggregate the motion into a new virtual device.

There is no need to do an AND in triggers. The AND gets done in conditions.

So your triggers are motion1 and motion2.
Actions/conditions are IF motion1 AND motion2 are active, Then XYZ.

5 Likes

You can't have AND triggers because that means that both triggers have to change simultaneously and that would be practically impossible. So, use OR then in your Actions, you add conditionals.

Your action would be:
If Motion Sensor A is Active and Motion Sensor B is Active, do this.

This trips up a lot of people.

7 Likes

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.

As an example, you might want to have a rule that triggers (i.e. runs) each time your door situation changes in any way. But within the rule, you want to have conditions.

If any door is open
turn light red
Else
turn light green
Endif

That's just pseudo logic. The way you actually put those conditions into the Actions part of Rule Manager is a little bizarre. You add conditional constructs such as If/Then/Else as if they were actions, which they are not. But that's the way the user interface works, unfortunately. It gets worse with terms thrown around like "Action Conditional" and "Conditional Action". Bear with it.

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

2 Likes

This is correct (I really should stop jumping the gun :smiley:) However I do use EE to generate AND events for use in wait conditions in RM.

IIRC, there was a post recently by Bruce saying he is adding complex conditions into the wait functionality. So at least for that, we should soon be able to execute that in RM directly more easily.

1 Like

The way I made sense of the RM Trigger/Actions is:

Triggers are just that, they are an instantaneous happening. The rule will only run if a trigger occurs.

Triggers could be:
The garage motion sensor senses movement
OR
The garage door (contact sensor) opens

The actions to perform once a trigger has occurred can have Conditions applied to it.

For instance an Action might be: Turn on Garage light

With a condition applied to the action: the action might be: If between sunset and sunrise then turn the garage light on.

2 Likes

Thanks all.

Download the Hubitat app