I have a thermostat in the garage that only goes down to 44. I don't want to keep it that warm, but I want to keep it above 32 (which it rarely gets down to).
I'm trying to create a rule that if the thermostat is off, and a sensor reads 33, turn heat on, and when it gets to say 36 turn it back off. But only turn it back off if the rule turned it on.
I have a general idea how to do this with basic conditional actions, but can't figure out how to do it in one rule vs two seperate ones.
Also the only way I can think to know if the rule turned it on was with a variable. Not sure if that's the best way or not..
But if you want to do it with one you can use temp changed as a trigger and then a couple of conditionals to figure out whether to turn it on or off. And a variable does seem to be the simplest way of determining whether the rule turned it on or off...
Trigger:
Sensor <= 33
Action:
Set private boolean to false
Turn on heater
Wait for sensor >= 36
If(private boolean = false)
Turn off heater
Set private boolean to true
End-If
I got a couple rules like that but it bothers my OCD. I have two for laundry. One for one the washer starts and one for when it stops. It drives me nuts even though it works
What other methods of turning on the thermostat are you needing to cater for? Can it be manually turned on or turned on outside of HE? Or are you simply wanting to cater for other methods of activation you have configured within HE? Such as a virtual button / dashboard control, etc?
Basically if I manually turn it on by the thermostat itself or via a dashboard.
The rule to keep it 33* in there is just when I'm not doing something up there. If I'm planning on working up there after work I'll usually bump the temp up earlier in the day.
Does this look right? I've never used the real if-then actions. Only the simple ones. Never used the private boolean either. Can I just check "This rule" and not actually create one?
In the action where I turn heat on, setpoint 44, I'm only using 44 because that's the minimum set point for this thermostat.
I'm going to create a virtual temp sensor and thermostat to test with..
I added it. I also added a couple notifications to my cell when it turns it on and off just so I know.
It seems to work as expected with the virtual temp sensor and virtual thermostat. I'm going to put it into actual use now but bring the temps up just to watch it work. (It's in the 50's here now vs the -5 last week LOL)
Rule machine was overwhelming at first but once you get used to it, it's not too bad. It's mostly confusing how you need to jump from one page to another for the conditions.
Wonder if some of your tests might benefit from using the "and stays that way for x amount of time" options so that as you come into and through these thresholds you aren't turning on/off any more frequently than absolutely necessary.... in an attempt to bring some level of hysteresis into play.
By the way, when it comes to freezing water in plumbing; it is a persistence of temp well below 32F (made worse by cold air drafts) that has been proven to be of concern. I protect some stuff similarly and don't bother to "turn on the heat" till my monitoring sensor has crossed through 30F; I don't start sending notification alarms until that space continues down to 28F (meaning my heat lamp failed)
That's a good thought. I saw that and thought about turning it on. I am using 2 sensors though, and requiring they both read less than or equal to what I set..
There's really nothing in the garage that can't freeze, so I'm not sure why I'm really worried about it. The only fluids are what are in the cars and maybe a can or two of spray cleaner or paint.
Back to this. I tested with virtual switches and thermostats real quick before I put it into production. This morning it was finally cold enough to the rule to kick in.
I think I need a conditional action to not command the thermostat it heat, unless it's off. I got my notification it was turning the heat on every so many minutes until the temp in the garage finally reached the "wait for" temp.
But I can't figure out where to add that into the rule. Can you have nested conditional actions in a rule?
And maybe I'm overthinking, but if I put the whole rule inside that conditional action, will it ever even shut the heat back off?
I also am setting a hub variable because I have another rule that turns the thermostat back off if I turn it on and forget, but doens't turn it off if it were turned on by this rule.
On the surface I would say it looks ok, but cannot say whether it will work with the other rules, May be worth including screenshots of those rules for others to consider....