Defining a greater than > less than < range?

I have some Ecobee temp. controller rules setup for my ceiling fans (20 in total) to automatically come on and go off between a certain range. All I’ve been able to define is greater or less than vs. >< range.

I would like to set up a rule that’s between 70 to 74°F.

Hope this makes sense. Thanks

Welcome to Hubitat!

Not sure exactly what you're asking, but it is fairly simple to turn something on only if temperature is within a certain range (using an AND between the two conditions). It would be something like:

Trigger:

Ecobee temperature *changed*

Actions:

IF ( Ecobee temperature > 70F AND Ecobee temperature < 74F ) THEN
    Turn on: Fan1, Fan2, etc.
ELSE
    Turn off: Fan1, Fan2, etc.
END-IF

Thank you. I know I can write the rule but all RM shows are drop down selections.

I found what you pasted as a conditional rule and defined it. However it would be great if I could just write the rule and copy/paste it in. Is this possible?

Thanks for your help!

This is not possible. It has been brought up multiple times. Your only option is to manually enter it via the UI. It would be a nice feature.

2 Likes

As @JNS said, you have to use the Rule Machine UI. It really isn't that difficult to use. Just be patient, and don't use the back button on your browser!

1 Like

Bummer. You would think since you can code your own device drivers that defining rules would be possible also. Well maybe in future, who knows.

Yes I have patiently moved over 100 devices off ST to Hubitat and loved every minute it. No problems at all. I can’t believe how cross functional Hubitat has become for my automation systems.

Thanks for the help everyone!

1 Like

It’s not that hard... Rule Machine just takes practice

Trigger:
Temperature > Ecobee Changed

Close trigger

Actions:
Conditional action, “if” > new condition > temperature > ecobee > less than > 75 > done

Choose “and”

Conditional action, “if” > new condition > temperature > ecobee > greater than > 69 > done

Done with condition

Add action > fans

Add action > end if

Done forget to click “done” on main rule page

1 Like

Thanks @morningz I was missing the “changed” trigger. That did the trick!

1 Like

So created the following rule which works. However when I manually turn off the fans they do not stay off. The trigger is overwriting the manual off.

Any ideas how to over ride the rule when manually turning off the fan(s)? These are all Lutron Caseta switches if that makes a difference.

That's because These conditions are just that...conditions. They are not thresholds. Every time the temp sensor is updated in Hubitat, the action is going to take place. The only way to get around that is to build in logic to do so. How do you want to detect that you don't want the rule controlling your fan? I use a virtual switch for this purpose.

I wanted to use my harmony activity which turns off the TV and those two fans. The harmony is in Hubitat as a child switch to the driver. I just don’t understand how to use that switch or how to “flip” a virtual switch to turn off “pause” the rule until I turn the fans back on using the same harmony activity.

Not sure I am making sense?

I'll chime in for (potential) help with the Harmony if you are using ogiewon's "Logitech Harmony Hub Parent" custom driver

If a given Activity is active, then the virtual switch is "on", if it's not active (another is active), then it's "off"

So in all your activities, only one can be on at once.

So i'm not sure how you want the Harmony in the mix above with your rule, but at the top you'd check "if this activity is on, then do or don't do this" (Rule Action > Conditional > Switch > Harmony Activity "movie" is on/off

I could be concise if i understand what you were trying to do more clearer

Nope...you're not. You can't use the fan as an override switch for itself. It has to be some other switch that you would control independently of the fans that would control whether this rule fires or not.

Harmony has NOTHING to do with it....just confusing the issue....

If I understand what you're trying to do correctly something like this should work. Your current rule keeps turning the fans back on whenever the temp changes and it is greater than 70. Notice how I changed how I'm checking the temp. The way you have it nothing will happen if it's exactly 70.

> Triggers:
> Temperature of Living Room(69) *changed* 
> Harmony (off) turns *changed*
> 
> Actions:
> IF (Harmony(off) is on(F) [FALSE]) THEN
> 	IF (Temperature of Living Room(70) is >= 70.0(T)  AND 
> 	Temperature of Living Room(70) is <= 75.0(T) [TRUE]) THEN
> 		Set Fan Speed: LR Ceiling Fan to medium-high
> 	ELSE-IF (Temperature of Living Room(70) is > 75.0(F) [FALSE]) THEN
> 		Set Fan Speed: LR Ceiling Fan to high
> 	END-IF
> ELSE-IF (Temperature of Living Room(70) is < 70.0(F)  OR 
> 	Harmony(off) is off(T) [TRUE]) THEN
> 	Set Fan Speed: LR Ceiling Fan to off
> END-IF

I can add the harmony activity as the trigger with no issue. My question is will the temp. conditions continue to be checked while the harmony activity is on (active) OR ONLY when its turned on?

@JNS am going to take a look at your post shortly. Thanks

@morningz I just don’t want the rule to run or be monitored if I turn off the fans, no matter the temp conditions in those areas. The harmony activity seemed like a good alternative to the ecobee temp. trugger.

I appreciate all the replies everyone.

You need triggers for temp and some switch. RM is event based. Temp will be checked if temp is a trigger. It has to be a trigger for the fan to adjust itself.

Is there a reason for this? You could make another rule to pause/un-pause this rule but I don't see a reason for that. You could setup a rule that pauses this rule whenever the Harmony activity is off and un-pause when Harmony is on.

Why do you want the harmony as the trigger? You need an additional condition, not trigger. And if the harmony is the fan being on, then how are you going to have the fans automatically turn on ever?

If Harmony is the fan then pausing the rule when harmony is on won't help. You need an independent switch.

It was suggested I add a virtual switch. Harmony is a switch that I can use to trigger the rule vs. the constant changing state of the temp sensor. I just don’t know if the rules conditions will be constantly checked while Harmony is active.

I asked here because I am looking for the best approach. Now I am a bit confused but am sure a little tinkering will get me there.

Working. I tweaked the rule from @JNS above and fans stay off if Harmony Off is On. If Harmony Off is Off the temp controls kick in. Working perfectly :grinning:

Thank you all for the thoughts and support.

2 Likes