Scanned the code and the only things that sticks out to me are "Contact" references that may actually only be labels. But this could be intentional. Line 63 "Contact Sensors Selected" and line 103 "Close Contact Button".
If I understand this app, it's a virtual button that will assign itself to the lock chosen, that when pressed will overwrite the LastCodeName value with "nameOverride"? So if I had two locks, I would have two "reset" buttons?
Yes. You are correct. The learning curve for Rule Machine is steep for me. I have all my logic in MSR (Multi-System Reactor) since I am straddling two HA hubs. I also have a family vacation home with a Vera hub that I will eventually move to HE, but I may not have the luxury of having MSR there. Right now I have the Reactor plugin and mentally trying to determine how to migrate those rules to Rule Machine. Trying to keep things simple there with a single unit there too.
I am very interested in seeing more of your rules on how to accomplish what I am after. Two examples for my vacation home.
- I have my Vera watching a calendar. If an event with a keyword is detected AND the lock code updates/changes AND the lock changes from "locked" to "unlocked" AND the mode is Vacation, then run a number of commands, change the mode to Home, and notify me LockCodeName arrived.
- And the reverse. When the keyword is no longer detected AND the lock is locked AND mode is Home, then run some commands, set the mode to Vacation, and notify me that LockCodeName has left.
I'm assuming that the above two examples would be two different rules in Rule Machine, correct? I have the calendar watching event figured out by the Google Calendar Search app. It's the Rules and the changing of locked to unlocked with the AND triggers I'm still wrapping my head around. And since a picture is worth a lot of words, like I just typed out.