Not something that's so easy to test and I don't want to have it wrong. I'm wanting RM to check if the garage is open and close it if so when we're away. Will these conditions always be checked for or do I need to have it run a check somehow?
Hubitat is an event driven machine.
You are asking for two events:
Garage Door Open.
Mode = Away.
It's important to understand that Events happen and that causes the Rule to be evaluated.
When the Garage Door becomes Open, an Event occurs and that causes the Rule to be evaluated. If Mode is Away at the moment The Door Opens, then you'd have True + True = True and the Action for True would be run.
Same for Mode becomes Away, An Event occurs and the Rule is evaluated. If Garage Door is open at that moment, again: True + True and Action for True would run.
Only you know the relative timing of Away vs Garage Door Open. Hubitat is not a State machine... it's not looking every second to see if you have some True going on.
It's probably an OK Rule. It seems like if you Open the Garage Door, drive away and then that causes Mode to change to Away, it would close the door.
On the other hand, If you pushed a button on the wall on your way out, and it set mode = away THEN you clicked the Garage door opener, as soon as the door fully opened, it would close.
Everything in Hubitat is event based, meaning that the state of a device has to change in order for the rule to respond. So in your case, either mode change or tilt sensor state change will cause the rule to be evaluated. If the rule truth changes, the appropriate actions will be executed.
Thanks for the replies. I don't use any buttons to set away so that shouldn't be an issue. I just want a backup. Not something to rely on to close it. Would it make more sense to set it up as away mode being the trigger to check? Then if it's condition is open close it . That way and the way I have it setup seem to work the same to me
If I'm understanding you correctly, the two ways you mention are indeed the same. If the truth value of one of the conditions changes such that all (both) of your conditions become true, then the rule will be evaluated. As written, the order doesn't matter.
The only thing I'd be concerned about besides what was mentioned above is what happens if you open the garage door right when you come home but your location mode is still "Away." If you haven't tested to make sure that whatever you're using to change the mode (geofencing?) changes fast enough (or at all, for that matter--I can never get this to work reliably for me), it should be fine. If you rely on manually changing it, that would definitely work too. It's just that otherwise I see a situation where it still thinks you're "Away," then you open the door so both conditions become true, then your rule ls evaluated and both are true, so your "true" action of closing the door will happen, ad infinitum if you keep opening it, until it thinks you're home again.
I'm using a presence trigger to open it. The same rule also changes the mode. It's been pretty reliable so I think I'll be ok there
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.