I have this striped down version of a rule with a Repeat.
When I run the rule, it does not obey the stop repeating actions as shown in the logs.
I expected the repeat to stop since the virtual switch is off. Instead the repeat goes on forever.
I have this striped down version of a rule with a Repeat.
When I run the rule, it does not obey the stop repeating actions as shown in the logs.
I expected the repeat to stop since the virtual switch is off. Instead the repeat goes on forever.
I think it would be easier if you would explain what you are trying to achieve.
The normal way to construct rules with repeat actions is something like this.
TRIGGER happens.
IF xxxx is on
THEN
REPEAT every 30 mins. (stoppable)
Notify xxxx
END-REP
ELSE
Stop repeating actions.
END-IF
With the above as long as xxx is on it will repeat every 30 mins.
When false the else will run and the repeating actions will be stop.
Notify could be replaced with whatever you want of course.
Hope this gives you some guidance.
You did not mark the repeat as "stop?" or "stoppable" (this is an option when you are creating or editing the action), so the behavior you're seeing is expected, and adding this selection should fix the problem.
Also, I assume the example you created is contrived for demonstration purposes? In real life, that would be an odd rule, so explaining what you want to do may help, as suggested above.
Ahh yes, from time to time i forget about making the repeat stoppable. I can't believe I still get messed up with that.
The example provided was just enough to replicate the issue. The actual rule is to modify the fireplace fan settings when the kitchen becomes occupied. The goal being to reduce the noise of the fireplace fan to as low as possible.
The rule: Event (kitchen becomes occupied)
Clearly there are somethings that need further explanation.
There is some background info required which I was trying to avoid. I have a dumb gas fireplace in the kitchen, it is the only device heating that part of the house. Weird, I know, but it is what it is. I will not be fixing that issue any time soon.
I have 2 problems that I want to resolve. On it's own the fireplace has a hysteresis of 2 degrees C. The room is either too cool or too hot as it swings 4 degrees. The other problem is the fan is loud and very annoying.
I purchased a Bond device that is controlled by a virtual thermostat. With the virtual thermostat configuration the room only swings 1 degree and is always comfortable.
The fireplace has it's own built in overheat protection. In addition I have my own rule to put the fireplace into overheat protection base on the length of time the flame is on or the temperature of the heated air from the fan. The goal is to never have the built in protection kick in.
I live in a bungalow with an addition. The kitchen is in the old part and the family room is in the new. What happens is that the kitchen is occupied for eating or otherwise briefly. Because of this circumstance I already have a virtual occupancy switch in place to control the lighting.
My first attempt to control the fireplace fan was to use a Leviton dimmer on the fan. I turn the fan to 60% when the room becomes occupied and 100% when the room becomes not occupied. This works well with no issues. In doing this I realized that i could go 1 step better.
The fireplace turns the fan on or off according to what ever it has programmed. Typically the fan is turned on approximately 7 minutes after the flame comes on and 12 after the flame shuts off. I can't change those settings. My thought was to cut the built in 12 minute fan cool down to something less. As long as the air coming from the fan is cool enough I can turn the fan off early.
This would work for a 'Whilst' command (Not available within Hubitat) but wouldn't this command structure continue looping through the Repeat and never get to the Else statement?
In my example the trigger is a switch.
TRIGGER
Switch xxxx changed.
So if the switch turns on then the IF would be true and it would repeating every 30 mins.
If the switch turns off the the IF would be false and the ELSE would be true.
Repeating actions would stop.
thanks everyone for the help. Since posting I have reworked the code several times. It's now simpler and no loops just some waits. Works to what I want now that I refined what it is I really wanted.