I'm looking to make a rule condition that involves Time since event.
I have a handful of motion sensors that I want all of them to be inactive for X amount of time. However it's only allowing for any sensors in the selection.
Is there a way to make the condition look at all of them?
In Rule Machine there should be an option for your triggers to select "All of These".
Ahh so it needs to be a trigger to select ALL?
Maybe this can be implemented as a conditional feature for multiple sensors? @bravenel
I would put all motion sensors in a group with appropriate settings and write the rule against the group
This is completely unnecessary. They can just be put directly into the trigger.
In.my opinion it.makes the logging clearer and the rule simpler as you can out the timeout value directly on the group.
Seriously? An extra app, and extra device and extra events is not "simpler".
The issue is that in the trigger you can't have 2 triggers with a "and" in between.
ie: day of the week and all motion sensors. It's either days of the week "or" all motion sensors.
How do I change the OR in the trigger to an and? Without having to tap into required Expression.
What's the aversion to required expression? You need an expression somewhere because you want to test for conditions (one or more of which can be combined to make an expression). Triggers are just events--things that happen. They do not have truth values (though some may result in a state change that can be tested in a condition). Thus, it does not make sense to "AND" triggers. You may wish to read more in the docs: Rule 5.1 | Hubitat Documentation
You don't need to use a required expression, though. You could do something like:
Motion active (or whatever)
IF (Day in [Monday, Tuesday, Wednesday, Thursday, Friday] THEN
// do whatever
This will run the actions inside the
IF when motion becomes active only if the day is Monday through Friday. You could do the same by using a required expression with a similar condition, which will instead restrict triggering of the rule. You may prefer one over the other depending on what else is going on in your actions and triggers.
I suspect the above isn't exactly what you want, but it demonstrates the general idea. If you want more help, I might suggest stating specifically, in plain language and not thinking of Rule terms, what you want to do, and someone can probably help (not sure I see such a description above). Good luck!
Thanks for the tip.
I guess I can reverse the triggers in this rule since the "all" sensors functionality isnt available within conditional actions.
I just think it'll constantly trigger the rule check after all those sensors will become inactive after 10 mins throughout the day. Rather than just once a day at a specific time it checks if all motion sensors are inactive for more than 10 mins to trigger the action.