The solution I settled on was to disassemble the TreatLife DS02F fan speed controller I already had and replace the WIFI module with an ESP8266-F12 that was flashed with ESPHome. It required a bit of investment… I had been looking for an excuse to buy a hot air rework station . I figured it was worth it since I plan to install another 2 or 3 of these sometime soon.
This is the video I followed that got me most of the way there. He takes apart a different TreatLife product, but it was fairly similar.
For what its worth, I ended up breaking half the clips that held the face onto the switch because I didn’t know where they were. There are 4 of them and they are on the sides. Also, be careful when removing the face plate, there is a thin ribbon wire the connects front to the back. Disconnect it like usual, slide the locking bar out before attempting to remove the ribbon. Since I broke those clips, I’m just going to use a couple dabs of Super Glue before I install it back in the wall.
If you use a hot air rework station to replace the chip, take the foam pad off that’s next to the microswitch. I tried to be really careful with the hot air, but the foam still slowly shrank. I noticed early enough to remove it before it caused problems. I was able to stick it back on the board before assembly and it was fine.
This link will take you to the ESPHome page for the TreatLife DS02F Fan Controller:
I started off with the example code they provided, but ended up changing it a bit. Specifically the
needed to be added, otherwise it kept giving me errors when i tried to look at the logs via WIFI through ESPHome. The below code is what I am currently using.
friendly_name: Master Bedroom Fan Control
# Enable logging
# Enable Home Assistant API
ssid: !secret wifi_ssid_house
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
- platform: "tuya"
Its working well so far! I added it as a button card to my dashboard. At first I could not figure out how to control the speed from Home Assistant since the entity it added behaves like a normal light switch, but then I realized if I “long press” the button, it would give me the detailed view which was a slider.
That’s my only complaint really… Personally I would like to have a toggle for the “On/Off” state and a dedicated separate slider to control the speed setting without needing to long press. Honestly its a mild complaint, I’m getting used to how it currently works and I’m starting to prefer it since it takes up less space in exchange for a different click.