New user here coming over from ST, used webcore, etc... Am I correct in thinking that if I want to use rule machine, i'm going to need to setup variables to store the time a switch was turned off, etc. to do something like this.
That is one option. Depending on what your goal is, you might also consider writing a rule that does something like:
Trigger event: Vanity switch turns off
Actions to run:
Wait for event: elapsed time --> 0:01:00
Wait for event: Guest Bathroom Motion active
(do your things here)
Waits get cancelled when a rule is re-triggered (note that delays do not--but can be manually), so this effectively waits at lesat one minute before the switch turns off before doing anything when the motion sensor becomes active. Just a different way to look at the same problem. (But note that this will only do something the first time motion becomes active after the switch turns off. You could also pause/resume another rule, change a variable or virtuales device, or a multitude of other options to get something that would do something every time...probably more what you were thinking.)
(Also, webCoRE can run on Hubitat too if you're used to that, but it's community code and not officially supported--same on ST, except ST has historically shown it lots of love regardless. I do think it's a good idea to explore the built-in options first, so good luck!)
Thanks for the details. I was trying to do everything with the built in rule engine.. but I will need to think on if its worth rewriting some of my more complex automations.