RM - trigger rule when ALL conditions are met

I want to trigger my "Goodbye" routine when ALL phones leave. Currently it is configured to run when ANY phone leaves, and I cannot see any way to change this. I can't imagine this feature is missing; that would be a serious limitation. What am I missing?

Triggers are driven by a change of state. The only way ALL would work is if all phones departed simultaneously.

ANY would be the appropriate trigger, permitting the rule to run if any phone leaves. ANY combined with a conditional in the Actions portion of your rule would cover the combination of ALL.


A has left
B has left


IF (A has left) AND (B has left) THEN
do what you want ....

@aaiyar Can you guide me through implementing what you suggest in RM?

Event Engine looks promising, and I will play around with it when I have some time. Why was the above post mentioning it deleted?

Sure - here you go - here's an example of a light being turned on if ALL "presence" conditions are met:

Triggers - if ANY presence leaves

Click on Actions, then Manange or Create Conditions

Click Edit condition - then select the desired condition

Turn on "All of these"

Click on Action type to add - then select Conditional Actions

Click on IF(conditions) THEN

Click on the desired condition

Choose whatever actions you need - I chose to turn on a light

Then Choose Conditional actions again

Choose END-IF

The completed rule

1 Like

WOW! I knew that RM supported if/then/else but had no idea how to implement it. It really seems that although very powerful, it is not the most intuitive interface. I will play around with this a bit and let you know how it turns out or if I have any more questions. Thanks!

Doesn't take that long to get used to it. And once you do - it becomes much faster. The basic idea is to create Conditions and then use those conditions in conditional statements.

1 Like

Another way to set this up with presence on the phones
away rule

1 Like

This is specifically what I use "combined presence" for. (It's available in Hubitat Package Manager). I have a single presence device that is a combined presence of the other presence devices. If ANY of the devices are present, the combined device shows present. If NONE are present, the combined device shows away. Then, I just use that combined presence device in any automation I am wanting to trigger when everyone leaves or when someone is the first to arrive home.

This approach also makes it easier to switch out phones without having to update a ton of references in other apps.

That sounds so much easier! Going to have to give it a try!

As for switching phones, or any device for that matter, if you name the new device exactly the same as the old one, do you need to update every rule?

Yes. Even if it is the same name, it has a difference device ID. So, all rules/automations associates with the old device ID will have to be changed to the new one. So, on items I am likely to change in the near future (such as phones), I associate them with virtual devices (like using that Combined Presence app). This way, I only have to update the one virtual presence association. (Learned this lesson years ago when I was on ST and went to update my phone the first time due to an upgrade)

1 Like

Good to know. I've actually been wondering this for a while. I may upgrade my switches some day, and was wondering if I'd have to change all my rules.

I consider switches more permanent. When changing them, I temporarily create a virtual switch to use as a place holder, and then switch it back with the newly added device. If you delete a device before removing it from rules/automations, you will break those automations. I just did this with 10 new Inovelli switches that replaced a bunch of GE/Jasco.

1 Like

Event engine will let you use ALL as a trigger.


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