Migrating from ST. I have created a virtual switch. How do I go about making it so it automatically turns off after 15 minutes. I have played with Rule Machine and Simple Automation Rules and it just doesnt look right. Any help appreciated.
AJ
Migrating from ST. I have created a virtual switch. How do I go about making it so it automatically turns off after 15 minutes. I have played with Rule Machine and Simple Automation Rules and it just doesnt look right. Any help appreciated.
AJ
Welcome to Hubitat!
You could try something like the following, assuming you're running Hub Platform 2.2.4.x
The Wait for Elapsed time was just recently added.
The one advantage of the rule that I posted, is that the “wait” will be automatically cancelled if you manually turn the light off and then back on again, thereby guaranteeing that the delayed off will always be the correct amount of time from when the switch is turned on.
In your rule, the delay will be scheduled each time the rule is run, thereby creating multiple scheduled events to turn off the switch. You can account for this by adding a “cancel delayed actions” as your first action in the rule. But using the wait makes this happen automagically.
oooh ok yeah I like it. Sounds like i need to upgrade then to get that feature. I posted in support. My applet didnt work with my VS so I am trying to run that down.
You can also just put a Cancel Delayed Actions as the first action to run. So then if the trigger fires again it will cancel the current 15 min delay and start it over.
Several ways to get the same thing done with HE.
nice man! i will add that
Could you use this rule with a physical switch as well? Instead of having to create a virtual switch?
Yes, the rule does not care whether the switch is physical or virtual. As long as your physical switch reliably reports it’s status updates to the Hubitat hub, the rule will work reliably.
The reason I went with a VS is so I could have the timer and I am working with wifi switches so I needed that to control through IFTTT.
I do have another question and looking for suggestion on solving this problem.
If garage door A opens it triggers the VS which sets off a rule to turn on the lights in the garage. Then 15 minutes elapses it turns off the VS which sets off a rule to turn off the lights in the garage. That all works fine. What does happen though is lets say Door A opens, then someone manually turns off the garage lights before the 15 minute timer turns off the VS. Then someone opens the Door A or Door B the lights dont turn back on because the VS is still on. I have come up with the following solution, everytime someone turns off the garage lights from the switch it turns off the virtual switch. What do you guys thin? looking for your opinion or more opinions or solutions. Thanks.
AJ