I have a rule that works but its probably not written the best way since it runs every 10 minutes regardless and then does the checking. Is there a way to rewrite it so it only runs every 10 minutes if the time check is right?
Based on what i'm seeing, you want those groups to turn off from 8:31AM - 4:30PM every day in every mode, correct? Why not use Simple Automations for this?
You could create a group of all the devices (or a group of the groups), and use that to be triggered. Just make sure the groups turn on if ANY device turns on
I have a set of things that turn the lights on but are unable to turn them off after a delay period. ie an ifttt trigger might turn them on but never flips them off. (trying to minimize these and flip to a virtual switch but in the meantime...)
So the rule I have runs every 10 minutes - which allows to whatever triggered the light to turn it on for a period of time and then ensure it gets turned it off. Possible they overlap and its a shorter than 10 minutes but usually its being fired due to a ifftt motion trigger and/or is a fail safe that I am used to having from when ST cloud failed to turn something off.
Over there I had to put in a bunch of failsafe logic so if a timer missed the next one would catch it. I know its a weird OCD thing.
Nice. I think I can do that with a group to make it scalable. I guess the question then is would it fire more than the fixed number of runs I have now. 6 times an hr x 24hrs.
In theory I really wanted to try and cut the fires to 6x8hrs but this actually keeps the lights on for 10 minutes and solves the flashing issue so is better.
Exactly. Think this is a better solution.
I was worried I was hammering my hub with the polling approach but this not only solves that but would also point out where I need to fix some of these ifttt rules and actually clean up some of this legacy triggers.
Appreciate it. Had not considered this approach.
Just realized I had another timer that I was running that really should be swapped to this.
When I wrote these rules I thought I was reducing the observation load but given the hub only looks at these things if there is a state change my head was thinking about it wrong.
And I don’t have to feel bad about having multiple ways for the lights to turn on w/o a delay to turn off or switching over to a Hubitat virtual switch! I think an ifttt controlled trigger can fire with no off delay and/or a local motion sensor as well which will have the off delay slightly sooner but either way this should catch and turn off after 10min.