Hey all, new to Hubitat. Trying to use my door sensor to turn on a pair of lights when opened after dark through 1am. I want the lights to go back off after 15 mins. Will this rule work? Or is there a better way to code this? Still trying to learn.
It might be me, but based on the requirement and the trigger , you dont need the if statement at all
Agreed here. The IF condition will always be true as the required expression will only ever allow the rule to run during the time frame. Your actions just need to be:
Turn on light
Wait 15 minutes //Can use either delay or wait here
Turn off light
A delay will not reset if the rule is triggered again. A wait will auto cancel if the rule is retriggered.
So, if you just want the light to always turn off after 15 minutes, use the delay. If you want the light to turn off 15 minutes after the last time the contact was opened, use the wait.
Thank you! Didn't know the "simple automation" thing was there. Much easier.
Question. Would this also be best used for the following?
Turn on a number of outdoor lights at sunset-30 and off at 23:59?
Right now I have what seems to me to be a fairly complex rule for a "simple" task.
So is there any advantage/disadvantage to doing it via rules engine vs. Simple automation rules?
it used to be less draw on the hub.. not sure anymore..
Thanks for the info, you guys are AWESOME!!
Like for like rules will consume the same amount of hub time. The difference, even for a longer more complex rule done in RM is so miniscule, it doesn't really matter.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.



