A while back, I wanted to add smart thermostats to my apartment. However, I was surprised by the lack of inexpensive, line voltage (or baseboard) smart thermostats. Originally I planned to do it all DIY, but I realized there's plenty of cheap, smart wall switches out there, and a line voltage thermostat is just a wall switch with a temperature sensor and some type of UI. Plus, I figured a converted wall switch is probably a bit safer. So I decided to make some. At the time, most smart switches used an ESP8266 so I designed a thermostat that could take advantage of the microcontroller that came with the switch. I've since moved to a house with central heat but has a baseboard heater in the bathroom. I wanted to be able to run the heater on a timer for showers in the winter so I redesigned the thermostat to use a ESP32 for the increased I/O to add buttons instead of the rotary encoder.
Full instructions, CAD, and ESPHome YAML files are over on Github
Files
button-thermostat.yaml
ESPHome YAML configuration for the 6-button version.
Does it use NV memory to remember the settings? Our off-peak electric heat can be off for hours at a time, meaning the t-stat (in series, of course) has no power as well.
Anything set in the YAML file it will always remember (your default preset). Set point changes should be pulled from memory on restart but I just tested it and that only seems to be working on the ESP32, not the ES8266.
Does it use NV memory to remember the settings? Our off-peak electric heat can be off for hours at a time, meaning the t-stat (in series, of course) has no power as well.