Sticky Triggers - Are actions run once or continuously if condition stays that way?

Sticky trigger question:

Once a sticky trigger condition is met are the actions run just once or are the continually checked until the sticky condition is no longer true?

I believe that once a "and stays that way" event is triggered that the actions are just run/checked ONCE after that "stays" trigger time threshold is crossed but correct me if I am wrong.

If that is the case, is there any creative way using the rule machine to make so once the 'stays that way' time is triggered that the actions be run/checked continuously (or at a reasonable interval)?

Trying to use a sticky trigger followed by IF actions to reset an HVAC unit that has has been running in cooling mode for two hours (or longer) but is not actually cooling the space. This is usually due to a stuck reversing or hot gas valve and simply stopping the unit/compressor from cooling for several minutes relieves the hot gas pressures to a level that allows the solenoid control valve to spring back to it's desired position.

Here is the Trigger:
Operating state of 1st Floor HVAC cooling and stays that way for: 2:00:00

Here are the actions:
IF (Temperature of 1st Floor HVAC is > 1st Floor HVAC +3.0) Log: 'ATTENTION - 47TH FLOOR HVAC STUCK'
IF (Temperature of 1st Floor HVAC is > 1st Floor HVAC +3.0) Thermostats: 1st Floor HVAC --> Mode: off --> Fan: auto
IF (Temperature of 1st Floor HVAC is > 1st Floor HVAC +3.0) Thermostats: 1st Floor HVAC --> Mode: auto --> Fan: on --> delayed: 0:05:30
IF (Temperature of 1st Floor HVAC is > 1st Floor HVAC +3.0) Log: 'ATTENTION - 47TH FLOOR HVAC RESET'

The trigger is just to get the actions started. In your case once the HVAC starts and runs for 2 hours then the actions will run but only once until the trigger fires again so again in this case the HVAC would have to stop cooling in order for the trigger to go again after another 2 hour elapsed time.

1 Like

Got it....I think.

So if the HVAC unit is running for two hours and none of the conditional actions have been met no action will be taken.

Now, if the HVAC unit keeps running (without stopping)...lets say for another 30 minutes and then the temperature rises such that the IF conditions in the actions are now true (ie the HVAC has been running continuously for 2.5 hours) nothing will happen...because the actions were only run/checked at the 2 hour mark). Do I have that right?

Any suggestions on how to accomplish what I am looking to do? Basically it's a conditional watchdog type check after a certain period of time that continues checking.

COrrect. The actions were only run and the conditions were only checked right when the trigger event happened, which is at the 2 hour mark.

One way to think about it is the hub does not respond if conditions are met. It responds if things happen and then it will test conditions following that event.

In your example above the rule will trigger once the state of the 1st floor HVAC is cooling and has been that way for 2 hours. As soon as that condition is met the rule runs once through. Each IF statement will be processed at that moment (plus a millisecond or two).

Or another way to look at it. At the end of two hours of cooling IF the temperature of 1st floor HVAC is more than three degrees higher than (I assume setpoint?) 1st floor HVAC at that very moment then you will log the stuck condition. If it happens 5 minutes later nothing will be logged because the rule is no longer running.

In this part of the rule

as long as the condition is met the mode will change to off and the fan will change to auto, then 5 and a half hours later the mode will switch to auto and the fan will switch on.

You could add a loop to the actions if you want to keep checking for a certain condition. Instead of using stays that way for 2:00:00, maybe REP every 15 minutes 8 times.

This is not the way to go. Instead, Wait for Expression, possibly with Duration (that the expression's conditions must remain true for some time), or Timeout (you want to give up waiting after some time).


But on the other hand, a loop might be appropriate once the conditions are met -- alert every 15 minutes until the situation resolves, for example.

Download the Hubitat app