Waitforconditions keeps waitng

Hi

Looking for advice. I have a attic fan and a Rule for both evening cool down and morning cool down.

The fan turns on then never turns off. The second wait for conditions is not satisfied. I must be misunderstanding something basic on how this is supposed to work. But I am not seeing it. Since 71.4 is <= 74 it should have triggered the fan off correct?

If I use a second rule to turn off the fan and reset the private boolean. The fan turns on again as soon as the temp hits 74+. As it is supposed to do. ( the basement temp probe is currently outside).

So what stupid obvious thing did I miss?

Thanks

One thing to keep in mind is whenever a rule triggers, any waits are canceled. That may be the cause of your issue.

I wonder if it has something to do with the way you're using private boolean? I think private boolean defaults to true. I generally set it to false while the rule is running and my conditional exit checks for false instead of true.

1 Like

My suspicion is the same as that of @terminal3: any time you get an event that matches your trigger, your actions start again (like any trigger would do), but your "Waits" also get cancelled (due to how the documented behavior of "Wait" actions works).

But there's no need to guess. :slight_smile: Turn on "Trigger" and "Actions" logging for your rule, at least, and see what "Logs" shows you about what happens when.

2 Likes

That is what I read also, that it defaulted to true. But when I had it the other way around is always exited. So it looked like it was defaulting to false.

I believe that Private Boolean doesn’t get changed on re-trigger. It is set to true when the Rule is created, and it’s left to you to set its state from then on.

OK the wait for conditions being cancelled makes sense. Because it does get triggered multiple times, and exit because of the true boolean while cooling down the house. On a hot day it could run for a few hours. I need to rethink the entire approach, and use a different trigger. Or add some sort of state that does not get reset on a retrigger. The idea was to cool down to 74 shut off then turn on when it warms up again. Then repeat.

KISS. I will go back to separate rules to turn the fan on then another to turn it off That is what I used back in rule 3.0.

3 Likes