I discovered Home Assistant about a month ago and have been thoroughly enjoying playing around with it. I wrote a bunch of automations that I had saved individually and then about 2 weeks ago I discovered and decided to have a go at the Node-Red integration… Since then I have transferred all of my automations over to Node-Red… Anyways, I love the community and wanted to share the setup I made for automatically controlling my thermostats based off of the current weather in my area and presence.
This was the most time consuming automation I’ve attempted so far but I am very happy with the results.
- Allows for 1 hour temporary temperature hold if someone manually sets it
- Automatically set the system into heat or AC mode
- Checks temperature settings every 20 minutes (only updates thermostat if needed)
- Has setpoints for when the house is occupied or unoccupied
- Sets the temperature at night for when I’m going to bed
- Notifies my mobile device whenever a change is made (this is mainly for debugging/making sure something unwanted didn’t happen - I’ll remove it eventually)
Now, I am not the best programmer and am completely new to this whole scene so bear that in mind before you judge how this was designed/coded. I am of course open to suggestions and tips/hints however… At any rate, here is what I’ve got!
The code and this message was too much to post here but I’ve uploaded the json file here:
Also, these are the variables being used/manipulated
msg variables for function and after function