Numeric Trigger question

Hi @bravenel,
I was thinking about this last night (after the disaster that was the Flyers game) and was hoping you can please clarify just one more thing (cue Columbo theme :smiley:). In the case of a numeric variable used as the trigger, i.e. yesterday's example; trigger when dehum < 80. Will the rule trigger every time the device reports a value under 80 or will the rule trigger only once when the device first reports a value less than 80? Thanks!

Every time. However, one can use a condition (such as private Boolean) to restrict the actions to executing on just the first occurrence.

The condition can be reset when “dehum” exceeds 80 again.

OK, I thought that might be the case. Your suggestion is exactly why I asked... to know if code is needed to avoid multiple, unneeded actions. Thanks

I do something very similar.
I have a global variable (boolean).
I then set it to true or false depending on the humidity level.
Humidity >80
Set variable bathroomabove80 to true.
Set variable bathroomabove80 to false.

I then use the variable state in my rule that uses the humidity level.
This way only the short rule above is evaluated when humidity changes which TBH is not that often unless taking a shower.
Not sure if this will help you or not but just thought I'd post.

1 Like

That works, too; thanks for the feedback!