I have a rule setup called Power Allowance TV. If TV turns on delay 4 hours turn off. It will turn off but sometimes in 30 min, or 2 hours, logs show delay 4 hours . Why would this rule be all over the place?
A Delay won't stop a prior run from continuing, so this rule fires anew every time the TV turns on (i.e. on/off, on/off, on/off would start 3 concurrent runs of this rule). So the odd times likely just correspond to the TV getting turned on & off in windows less than 4 hours.
A couple options to work around this, but the easiest way would be just use a "Wait for Events: Elapsed time = 4 hours" instead of the Delay - then any pending wait(s) would be canceled if the rule fires again.
When this link loads, scroll down to the blue box for more info here:
I think that should be a winner!
A logical question would be "Why not just always use that 'Wait' option instead of a 'Delay'?", and -- in general -- that's an admittedly safe move.
For me, Delays are bit easier to tee up when writing the rule, and I confess they just simplylook better to me, so although it's not super logical, I admit I'm kinda drawn to them first.
If the rule has no chance of triggering again once its in motion, I use a Delay. I have plenty of rules where that setup works perfectly fine, and always will.
But if there's any chance it can trigger again while one instance is already running, then I use a Wait. I also have plenty of rules where that's absolutely necessary.
Another option would be to use the Basic Rules app
Or, similarly in Rule Machine
Thatโs what is nice about Hubitat - many ways to achieve the same result.
Ha, yes - good call - many ways to skin the ol' cat!



