DS18b20, ESP8266/32 custom thermostat

Hello.

Fisrt things fisrt, I am a beginner with Home Assistant I started playing with the software for about 2 weeks now. I don’t have any smart switches or sensors in my home at this stage but I am planning on putting some in, in the future. So the first thing that I’m thinking of automating is my hot water boiler(Geyser). I am thinking of using a ESP8266 or ESP32 with a DS18b20, the waterproof version, that will switch a relay to switch the element of the boiler on or off, based on high low set temperatures. I also want to have a manual switch connected so that I can switch the relay off manually, but the sensor must still give me the temperature readings.

I played with ESP home and I can get the sensor to give me readings and I can switch a relay with a button on there own. Then I saw there is a thermostat card and I tried to use it but it does not detect the DS18B20 sensor. A normal gauge card works perfect but it is only a gauge with no control to set high/low values or any of the functions that I want for my thermostat.

Is there a way that I can make my own thermostat card or to make the home assistant thermostat card pick up my sensor?

Thank you in advance.

NB. I installed home assistant in virtual box on windows 10. At this stage it is just for training purpose. Will install more permanent version on a Pi in the future.

The DS18B20 is a single sensor. Not a climate device. The thermostat card requires an entity from the climate domain.

You need to implement this:

Hi thank you for the reply.

I came across that code and I tried to put it in my esp home yaml. But I get an error on the “- platform: thermostat” line that say ‘idle_action’ is a required option for [climate.thermostat].

It’s in the documentation.

Ok I will go through the documentation again. I’m not so clued up with the programming yet but it will get better. Thank you very much for the reply and the help.

You just need to set it to turn off your boiler switch.