I have three house locks. One is garage, so nix that. Two (Lanai and Foyer) are in-house. I want to test each time a lock status has changed and set HouseIsLocked variable to true or false depending on the following:
If both locks are locked AFTER the action, then HouseIsLocked should be set to locked. Otherwise it should be set to unlocked if both or one is set to not locked.
I can't figure out the logistics that won't create a loop-effect. ie: one status change causes the other to change and fire the rule which will make the variable wrong.
Any help is appreciated. NOT using HPM please. I use only first-party rules and apps.
OMG! Perl programmer of 40 years here...and I didn't REALIZE you could have two actions, the second overriding the first...cos I didn't know they were:
A: guaranteed to be atomic
and
B: actually DID operate one after the other!
If the previous statements are true, I am THRILLED!
I was VERY wary cos opening/closing and on/off of devices didn't SEEM to operate according to instruction order on Actions.
ie: i've had "close this blind" and "open that curtain" in the same rule, but open curtain would execute BEFORE close this blind. So i didn't trust rule order.
Ummm. I don't believe I asked for a third party messy solution. Rule Manager is the way I work. HPM is not the way I would ever want to go. I want control of any packages I install.
Well I liked your suggestion. I currently have a long series of if/thens that check all my locks and contact sensors before finally announcing the status on my Google Speaker.
I wasn't aware this app existed, but I plan to have a deeper look into it.
Although I do have to say I find this to be a little curious.
Custom code written by community developers is open source, whereas all the apps and drivers in the hub firmware are closed and canāt be reviewed by anyone.
So many people would probably argue that third party code gives the user the most ācontrolā over whatās actually running on the hub.
ETA: driver or app code can be installed manually on the hub, avoiding the use of HPM, if thatās a specific concern.
Correct. I added it cos I assumed that most people would give solutions - as @user5298 did - which used hubitat-only device drivers, etc.
The reason? I just updated from C7 to C8 pro and NO MATTER DEVICES WORK ... nor do many of my third-party installed device drivers (non-HPM).
I want something that will work update-to-update...and C7 to C8 Pro, etc... I don't think that's too much to assume - when I'm posting in a hubitat "get help" forum.
I don't want things that will give me spousal nightmares if i decide to update my hardware!
So, high-horse and all, but yeah... I go for hubitat-only ... or I won't expect it to work cross-migration. That's not too much to ask.
ps: about an hour after the fact is NOT "well after". I just saw a screenshot of a HPM app - with NO OTHER DETAILS or help!
(nitpick) you can OR multiple devices as part of the same trigger (select "any").
I am not sure what you anticipated might create a loop. Triggers are locks, action sets a variable - no loop possible, unless I'm missing something. Do you plan to operate the locks from within the rule?
Yes, in general, when it comes to the rule itself and its actions (although there are exceptions, such as adding a delay directly to the action).
That's surprising. Do you have logs showing the execution order was wrong?
Note that rule execution order doesn't always match observations in real life, mainly due to different devices having different delays and reaction times.
Well, that app would have solved your problem, and it was suggested by just about the most helpful person on this forum (and also the app's maintainer). They've even been known to write apps for people just to help them out.