Turn on blower when temp rises and off when temp falls

Hello Hubitat world!

I am totally new to Hubitat so please be kind. ;o}

I'm trying to set up a rule with very little success. I want to turn on a blower (wemo mini switch) when a temp sensor (Smartthings Multi-sensor) rises above 75 degrees. The blower should stay on as temp increases (tops out at apx. 115) and turn off when temp falls below 90.

I can get the blower to turn on at the correct temp or, I can get it to shut off at the correct temp but, combining the two creates a loop in which the switch constantly cycles on/off.

How can I create my rule using CHANGES in temp, i.e. RISE ABOVE or FALL BELOW as opposed to fixed temp settings?

Sorry if this seems simple to most of the folks here. I tried searching but I haven't been able to find a solution to this particular problem.

Thanks in advance for any assistance!

This is a rule I use to turn my bathroom fan on and off if humidity rises above 80% and falls below again.
You probably want to do something like this.


I think 2 rules would do it. First rule, condition of temp > 75, actions when true: turn on switch. Second rule, condition of temp < 90, actions when true: turn off switch.

Actions are only executed when condition state changes, so rule 1 would only be eligible to run again after the temp falls below 75, and rule 2 would only be eligible to run again after the temp rises above 90.

He has 2 different temp thresholds to make actions happen, so I'm thinking it needs two different rules.

This is what I had.

Switch came on at 75 and stayed on as temp climbed. Switch turned of when temp fell below 90 but the tried to turn back on. It was kind of interesting, listening to the blower rev up and down.

Were you using triggers or rules? Triggers will fire continuously, where rules need a change in state to fire.

Use 2 triggers.
One for rises above 75 to turn on and one to turn off when falls below.
that would do the trick.

Triggers will cause the actions to run every time the temp updates. He needs rules with conditions.

Posting a screenshot of you Rule overview like @bobbles and @destructure00 did, along with a description of what you’re expecting to happen is the best way to get help with a rule that’s giving you trouble.

Hmm. Very true.
Perhaps you need a Private Boolean in the first rule.
When it rises above 75 turn on and set PB to false.
When drops below 75 set PB to true.
Then in first rule use a rule for temp above 75 and PB is true.
Then the turn on rule will only be able to be true after temp has dropped below 75 and PB becomes true.

Something like this.
Then another rule to turn off at 90 and one to set PB to true at 75.

3 rules in effect.

I've never tried it, just my initial thoughts.

Thanks everybody!!
I am testing these 2 rules now. I will post back with results.

Are you using restrictions?
You could use PB for the first rule you published as a restriction which would effectively disable the rule to turn on the fan until you set the PB again.

Side note. I have noticed in this community, that unless you come off as a D*** everyone is very helpful / polite, and eager to help a fellow Hubitater.

1 Like

Thank you all so much! This seems like a great community. Very friendly and helpful.... and quick!

I believe I have it working....


and OFF....

And so starts my foray into real home automation. :o)

I'm a little confused...you are turning the blower on when the temp is >74 but then off when it's less than 90. I would think this would turn the fan off right away because you are setting the PB true when the temp is >74. Also, you are setting the private boolean for the first rule as false but never setting it true again, except by itself. That part will never fire once the rule's PB false. The rule would have to execute and be evaluated true for the PB to be set true but to execute it has to be PB true....circular problem. So, you would need to set it true somewhere else if you wanted to do it this way. Otherwise it will work once but not the second time. Or you could set it true with a delay in the rule itself when you are setting it to false.

Wouldn't the logic be more like
On if >80
Stay running down through 80 past 75
Off if <75
Between 75-80 is the comfort zone

Now, since I have the same use case, and I haven't been able to get mine to work correctly either, at least the way I think it should work... I'm all ears


Well, that was my question as well, if you turn the fan on > 74 and off <90, which do you really want from 75-89. Your use case is a LOT easier, Two triggers, One turning it on at >80 the other turning it off at <75. Once it kicks on at 80 it wont turn off till its <75.

Trigger 1:

Trigger 2:

Doesn't that leave the fan off from 91 through 115? If I get the use case right, he wants it to come on at 75 and stay on through 115. It's the act of cooling down past 90 that turns the fan off. I think the 3 rules below makes his case. I'm not saying it's the best solution though. It's just setting up a condition to account for the direction of the temperature.

So maybe:
If temp > 75
turn virtual switch on
turn blower on
Turn blower off

if temp > 90
turn virtual switch off

if temp < 90 & switch off
turn blower off

I just don't think that's really what the OP wants. Why would you turn a fan on at 75 but turn it off when it's only 90? You'd want to cool it at least to if not lower than the turn on point. wouldn't that make more sense?