RM scenario I can’t seem to make it work

well if I look at my conditional clauses they would look like:

trigger like yours
condition: if iphones leave - any leave + SHM sate is disarm
action: your options

at the moment you just look for the trigger while a certain condition is met but you dont combine the trigger and condition to be true for the rule to fire - just what I think - not sure if I made myself clear here :slight_smile:

r4nd0m is correct the condition should include the trigger value plus any condition you want to look for in your case SMH=disarm. So your condition would look like this.

Trigger presence = left

Keep in mind you will need an arrival sequence for you false statement.

One question are you using this trigger to validate if something was already done & correct it if not? If so you could create a conditional trigger or rule to validate things were done.
I use most of my rule machine rules to validate that my local routine settings were completed & if they were not rule machine will complete them after a 1min delay. It’s just my personal preference to try & keep us much as possible locally on my ST Hub. See below for my Conditional trigger to validate my routine ran & if not then rule machine will run it.

Thanks for your help.
But the condition for phone is either present or not present. No “leave”.

Thanks for your help too.
My thought is to use RM to set the mode to Arm (Stay) 30 minutes after either of us left the house.
The Routine – Goodbye! will set to Arm (Away) in 10 minutes when both of us left. This is working fine.

For some reason. My RM in the initial post still kicks in after 30 minutes we left the house. I would think the “Only when mode isHome and Night will prevent the rule to kick on. Obviously I make a mistake some where.

So you would need to create a rule in RM for goodbye & set it up exactly like your routine. Then create a rule for stay home. Then create a rule for the one person leaving the house. Then you would set up the rule to evaluate both actions. I will see if I can create a screen shot of what you are looking for. However it might be a little bit since I’m at work & really not suppose to be on my pad lol.

1 Like

Thanks K. That will be so helpful.

In the meantime I will try to explain the process.

In RM I have several actions that I have created because I use the same actions for multiple conditional triggers or rules. Furthermore I always label my RM commands with either (CT) (A) (T) or ® to identify what type the command is.

Local Routines if you will decide to keep your setup the way you have it now you will need to add some routines Otherwise everything can be done using RM.

These are the Routines you need to create.

Away: with your armed away criteria.

I’m back: with your criteria

Stay: if one person stays home how do you want things to respond.

Night: both are home & in bed.

For each one of these routines you need to have an action & then the command to activate that action. I like to use (CT) but you can use (CT) or ® in rule machine. It needs to mimic your routine parameters exactly ( Trigger, action, condition) & you will need to have a false parameter to counter the action. Then you can set rule machine to evaluate either your (CT) or ® with a delay. And if your routines didn’t fire the RM will fire after the delay.

1 Like

For example using the away parameter in rule machine.

Trigger= everyone’s left
Condition=everyone’s away system is armed away.

Action true= Evaluate after delay all lights off, all doors lock, system armed away.

Action false= Evaluate after delay, stay rule & night rule.

How about just set the mode to Arm (Stay) 30 minutes after either of us left the house.

that falls under the stay rule with any not present set alarm to stay delay by 30 min

1 Like

I will think about it too.

It’s easier if you think of your house in 6 categories (away, stay, sunrise, sunset, sleeping, & I’m back) & then configure them around each other using the opposite action or actions to counter the true action.

I think you’re gonna have to set it up as a rule.

Use your presence and alarm state as the conditions.

Use a complex rule
Subrule - Phone 1 is AWAY or Phone 2 is AWAY
SHM state is Disarm

Use the same actions that you have now, but on the “Delay These Actions” screen, you’ll now have an option to “Cancel on truth change?” Set that, and it will cancel if your rule stops being true. (ie - both phones return home or the SHM state changes.

That should fix your issue. Does that help?

(I do something similar in combination with a mode change to leave at night too. You’ll probably need to coordinate with modes if you want the proper result during the day and at night. That way you set up your modes around times or whatever to transition periods of the day, and then, you can use your rules based on those as well to get the correct result. The above works, but it works the same regardless of the time of day.)

1 Like

I still think my first response would work, but it may not be the answer you’re looking for.

It still kicks in because the “Only when mode is” only cares about what the mode is when the action is scheduled. The action is scheduled, and it doesn’t pay any more attention to it. It will run regardless at that point. It’s just delayed.

I haven’t had any issue with too much lag when just checking conditions in a rule, but if you have, try this.

Use the trigger you have to instantly change the mode to “Leaving”. Then, have a second rule watching the mode and SHM state, and use the delay and cancel option I mentioned before. It watches the mode, not the presence. If the mode or SHM changes state, it gets canceled.

Either way should work, but I think this is the one you’re looking for. Hope one of those two ideas help out.

I will give it a try and let you know in the next few days.
I can only test it so many times :sweat: Wife will start asking question if I keep stepping away after I got home.

1 Like

Then, you might try it with a virtual switch first:

Use that as a condition or trigger along with your presence sensors. Since it’s basically an or statement, adding in an on/off check shouldn’t be a big deal at all.

1 Like

Sorry I didn’t get back to you last night, I was fixing some issues with my Hub after the upgrade. I thought about this on my way into work.

what you can do is (see below) & assuming you have return rules & so on.

Create a Conditional Trigger
Trigger event- using something constant like time of day, door sensor opening & closing & so on.

Conditions- select the trigger event above (what ever you picked) & add when anyone is present.

Then select your true action ( Away parameters)

False action would be your stay parameters.

If you look below my house everyone is always gone by 7am so I created a trigger using 7am as my event, pay no attention to the evaluate portion because this rule is a verifying rule to make sure my routine fired after 1min. But the parameters would be similar to yours.

**Conditional trigger



Conditional trigger









Away conditional trigger


1 Like

Thanks. I will give this a try.

Think of your options this way. I want my front door to always be locked except when I return, then I want it to re-lock after 10min.

Let say I choose presence as my trigger & I selected everyone’s leaves.

My condition would be presence everyone’s all not present.

Keeping in mind the only action I want to set is the lock feature.

My true action would be locked (Which means when I’m away my door will be locked)

My false action would be locked ( because I don’t want my door unlocked when someone is present that will be handed by another automation called I’m back)

Now I set up my two I’m back automations one for daytime & one for nighttime. The rest of the actions would be identical.

Trigger is when any arrives.

Condition nighttime ( sunset-sunrise). & my second rule would have (sunrise-sunset)

My true action would be door unlocked

Now for my false action I created a separate action call doors locked.

My false action is evaluate action after delay (action doors locked) 10min.

This means 10mins after my rule fired my false action is going to check to see if my door lock is set to locked & if it is not than it will lock it based on the parameters I set up in my door lock action.

If I set my false action to be doors unlocked that means because my trigger is anyone arrives my doors would be unlocked when no one was home.