Save Money with Home Assistant and Nest – An Automation Example


Sometime around Home Assistant Release 0.96, my favorite Nest automation broke.  The automation, which saved me tons of money, would turn off the first floor Nest Thermostat whenever the alarm system reported to Home Assistant that a window or door was open for more than 5 minutes.  This was great in the Spring and Fall when we like to open up the doors to bring some fresh air into the house.  I wouldn’t have to worry that the Air Conditioner was running while the windows were open.

Related image

The breaking change was a modification to the service call that controlled the thermostat.  The old one which was climate.set_operation_mode was changed to climate.set_hvac_mode & climate.turn_off.  These two changes were easy enough to make but it was something that slipped my mind when I had done my upgrade.   In the video below, I go through the process of understanding what services are available for your devices and a look at how the UI can be used to better understand the YAML behind it.

The automation at it’s core should be pretty easy to understand.  It requires you have a way to monitor the openings of the house.  In my case, we are using the alarm system  that was DIY’d from my old alarm but could easily be adapted to Wyze sensors, Zwave or anything else.  Then it’s just a matter of tracking the time and then controlling the thermostat.

When the thermostat is turned off, we also make an announcement via the TTS system to let everyone know to enjoy the fresh air.  Then when all openings are closed, we put the Thermostat back into auto mode.

This works great for my set up and is a great automation to have in your home that just works in the background.  Truly adapting to the home as environmental changes occur. This is Smart Home level stuff. 😉

Happy Automating and enjoy the money saved!