Rule review requested

I have a Flume attached my water meter with 2 wet notifiers: large volume of water for 15 minutes and any amount of water continuously for 2 hours. I set my 1st floor thermostat to 60F over night with a return to 67F starting at 5AM. On very cold nights (<10F) it can take over 2 hours to bring the temperature back up. The furnace humidifier runs continuously (.02 gal/min) during this time and sets off the Flume notifier which then turns off my master water valve. I want to try the rule below to pause the furnace briefly to reset the Flume.

What I'm interested in is did I overlook any side effects to this rule (the thermostat is controlled by an instance of Thermostat Scheduler). I'm hoping the required expression will prevent the rule from cancelling the second wait when the "off" is issued. Thanks for taking a look.

I think it has a problem. The rule will only trigger when the thermostat is in heating mode, due to required expression

So it seems to me the first IF will never be executed. Since the trigger is the thermostat changing operating state, it can only change away from heat. So it will never be in heating mode after the rule is triggered.

Of coarse I could be missing something.

You might consider using two rules. Have a rule that does nothing but runs the rule above,

Trigger: Operating state change

Actions
run rule 1St floor thermostat changed.

Remove the required expression and the trigger from the above rule and add a line to pause the "calling rule" at the beginning and to resume the "calling rule" at the end.

So whenever the thermostat changes operating state it triggers the new rule which calls runs your rule above. Since the rule now has no trigger you do not have to worry about re-triggers aborting the rule. When the rule finishes you resume the trigger rule and it will start again on the next change.

Or

Set your required expression to private boolean true.

Then set the private boolean False just after the IF. Then set it back to true at the end of the rule before it exits,

"thermostatMode" and "thermostatOperatingState" are two separate states. "thermostatMode" can be ["auto","off","heat","cool","energy save heat","energy save cool"]. "thermostatOperatingState" can be "heating, cooling, idle". Since the humidifier is only powered when the furnace heating, I thought "thermostatMode" == "heat" would be a good required expression to enter the rule. Of course if I ever set it to "auto", I'd have to make the rule more complicated. I figured that setting "thermostatMode" of "off" would let the second wait finish and turn it back on again. I guess the best thing to do is just test out.

I suppose a more interesting project would be to get ZEN17 and sense the 24v at the humidifier solenoid and control it the humidifier directly.

That was what I missed. In that case, yes as soon as the mode changes to off the rule will not trigger again until it changes back to heat.