Logic in Trigger Events?

I've been looking through the documentation, but I can't find how to set up an AND logic for my Trigger Events. Whenever I create 2 trigger events, it always shows OR, so that either will trigger the event. I'd like to set it up so that both events must be true for the Action to occur.

On a side note, I think I'm running Rule Engine 5.1...how do I find out the version I'm running

You're mixing up triggers - which are events, and conditions - which can be true or false. Likely your answer is to use Required Expressions in some capacity.

Can you share the details of your desired workflow? With that, someone might be able to suggest a solution

1 Like

as stated use the required expression or first thing in the actions add and and
if (trigger 1 and trigger 2)

etc

You may have been looking in the wrong spot. :smiley: (These are new but accessible from the "?" in the upper right when you're editing a Rule 5.1, or from a link or two or search on the docs site. Raising awareness since they are new, not to poke fun!)

https://docs.hubitat.com/index.php?title=Rule-5.1#Why_can.27t_I_use_.22AND.22_in_the_list_of_trigger_events.3F

Why can't I use "AND" in the list of trigger events?
[...]

That being said, either of the above is likely to help, depending on what exactly what you're looking to check. The latest Rule 5.1 update adds to this somewhat with the ability of "stays" triggers ("sticky triggers," not yet documented) that aren't just events per se, but the general idea is still the same.

1 Like

I can’t help but roll out my standard explanation here ..

Think about the difference between a change of state/trigger/event/described using verbs (“the door opened”) and a condition/state of being/described using adjectives (“the door is open”).

Thanks guys...
Here's what I'm trying to do - I have a multi-sensor by my front door, and a light 'connected' to it so that when movement is detected, the light will come on for 5 minutes. What I'd like to do is have an AND condition so that the light only turns on when it's dark. When I build the rule, it comes back saying "If there's movement OR the illuminance is below my threshold, turn on the lamp" If I can change the OR to an AND, I'd be happy.
Bertabcd1234, it looks like your link might get me in the right direction - thanks.

You write the rule with the trigger as movement and chck for illuminance in the actions.

But i would use the motion lighting app anyway. That is what it was designed for..

here is mine..

2 Likes

Similar to above, but a bit clearer (to me):

Have your Rule trigger on movement, have a required expression of illuminance being below a certain value. All triggers will be discarded if the illuminance is not below your threshold value.

But motion lighting has many options, and is very rich in configurability.

2 Likes

Download the Hubitat app