Smart Heating with HomeAssistant

 A pile of blankets on a table

One of the problems in our apartment was this:

A simple temperature sensor with a dial that has the values *, 2, 3, 4, 5, 6

A really dumb thermostat. Since we have floor heating, this little thing created tons of problems. Floor heating behaves like a big cargo ship. You cannot quickly move it around. The floor needs time to heat up, and if the desired temperature is reached, you cannot simply shut it down. It will continue to radiate heat to the room. With this dial, a accurate temperature was just not possible. Also we didn’t want to heat the rooms at night and wanted them to cool down. And ideally to warm up just before we wake up.

The solution: get rid of this stupid thing and install something smarter. Something that has ZigBee and can be added to Home Assistant. Something like the MOES ZigBee Smart Thermostat.

First, I had to get rid of the old thermostat and install the new one. Luckily, this was relatively easy. Pull out the dial and you will find a little screw.

The dial is removed from the temperature sensor, revealing a little screw

After that, you will find that the guts of the device is rather empty.

The inner workigns, you see three wires and a little metal strip that is the actual sensor

Get rid of it.

A hole in the wall, three cables are visible

Luckily, they left some nice schematics for us.

The cap of the temperature sensor, a schematic is printed inside

Install the new thermostat following the schematics printed on it.

The new sensor is attached, but not screwed into the wall. You see the backside of it and three wires

Success.

The new temperature sensor showing 21.5 degrees Celcius

The next step is to add it to your Home Assistant and add some rules. Since this is an unsupported ZigBee device, you will need to add a custom quirk to Home Assistant. This file works fine with my device. The Readme of the file explains how to add the quirk to Home Assistant.

The rules I have are something like “if the forecasted outside temperature today is below 15 degrees Celsius, activate the heating at 6 o’clock for 5 hours with a target temperature of 21 degrees Celsius”. Nothing too fancy (yet).

I also added a rule that activates the heater for 5 minutes per week in warmer months. That way I can work around the problem that the heating valve gets stuck, and I have to fix it each winter.

If you see that the temperature of the device does not match the room temperature, you can tweak the offset a bit. Simply call the temperature_calibration function via ZigBee and set it to a new offset. After a few seconds, the device will update the temperature to the new value.

Portrait photo of Bodo Tasche
Bodo Tasche
Polyglot Developer

I am a freelance polyglot developer and love HTML5, testing, TypeScript, Ruby and Elixir. In the last 20 years I have been in lots of different roles, from Java to Elixir, from backend developer at a 3 people team in an early phase startup to the CTO of a web agency. Some of my work can be seen on my projects page.

Need help developing your MVP or to add new features into your current app? Need a CTO or a front/backend developer for hire? Send me an email.