I have an automation setup for outside lights to come on upon our arrival during dark. That one is easy. It doesn’t matter who is home or not…if it’s dark and someone arrives, turn them on.
I would like to run an additional automation that will basically do this:
IF either of us (or both) arrive and no one was previously present,
Then turn on the inside lights.
I don’t want to change the inside lights if someone is home. It could be any of us arriving and any of us gone at different times so it’s not as simple as just turn them on when we arrive. I keep thinking I can do it but ultimately, my logic is flawed. I’m basically making the trigger an arrival, then putting in a condition that says if we aren’t present, do this. I’ve tried predicate conditions, conditional actions, etc and just can’t figure out how to make it make sense.
Please help, Thank you in advance!
With Rule 5.0, I think you could do this more easily if you use predicate conditions. A predicate condition prevents your rule from triggering if false, so basically make sure it's only true when you want the rule to trigger. In your case, this seems like it should be only if everyone was away to start. Maybe something like:
Presence X, Presence Y all not present
Presence X, Presence Y any arrives
Actions to run:
I use Modes for just this situation at my home. I set true "Home" mode when presence is positive within X minutes, In my case the delay is set to put the HE in "Away" mode in 1 hour if nobody is in the house (it checks both presence and motion sensors - adding motion to the rule covers our housekeeper or guests that do not have presence monitoring linked to HE, motion also triggers the house needs to be in Home mode). In your case your test would be when you or your wife arrive to see if HE is in Home mode (someone is home or has been within the delay period you define before HE switches to Away mode) or not. If it is in Home mode upon you arrival do X, if it is in Away mode do Y. Have fun j
I've tried so many now I'm not sure, but I think this is one that I tried. My thought was if the rule only runs if the predicate is true, so putting the predicate as not present but the trigger as present would conflict. I was thinking the predicate had to be true throughout the entire rule. That's probably where my newness is messing me up.
So in this situation, the predicate would be up to the rule running, correct? Basically the predicate is in place and no one is present, then the trigger changes to present. Is that how that would run?
I actually have a way and home modes set up. I guess it would be similar, it just got a little hairy with the individual coming and going. I did download combined presence and have that installed. For my purposes, I'm not sure does much different than just saying A or B has arrived, but I figured I might be able to use it somewhere along the way.
I'll mess with the mode settings and see if I can accomplish it.
The predicate affects the ability of the rule to trigger. (The predicate becoming false will not stop anything the rule has set into motion, like a wait, repeat, or other schedule, which some people would lump under the idea of "running.") So, your trigger should only really trigger if one sensor arrives and both were previously away, and then it won't trigger again (until both again leave) since the predicate will then be false.
Where are these "predicate" rules? Is it a variable?
Predicate conditions. They are a new feature in Rule 5.0, available in the new version of Rule Machine released with hub firmware 2.2.8.
hmmm, i cant find that. i got 4.1 rule machine
found it, do i need to move all my rules over?
No, older versions of Rule/Rule Machine will continue to work indefinitely. Eventually (perhaps with 2.2.9), the ability to create new rules in the older version will go away, but that is all.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.