I just managed to flash a DS02 Tuya dimmer switch with ESPHome using tuya-cloudcutter and the libretiny ESPHome library. I used the yaml config from the ESPhome devices page
Once the dimmer is discovered in Home Assistant, I can successfully add the device to my dashboard with dimmer and on/off switch controls. The dimmer state in HA tracks the hardware buttons and indicator lights on the switch. However, if I toggle the on/off switch, I hear the relay change state, but HA immediately bounces the displayed state back one second later. So I get weird log entries like this:
HA GUI Button Press:
turned on triggered by service Light: Turn off
11:08:43 PM - 9 minutes ago - Steveturned off triggered by service Light: Turn off
11:08:42 PM - 9 minutes ago - Steve
Hardware Button Press:
turned on
11:19:45 PM - 9 seconds agoturned off
11:19:44 PM - 10 seconds ago
Any idea what could be going on here? I haven’t set up any automations at all. HA version 2023.11.2 and ESPHome version generic-bk7231t-qfn32-tuya by LibreTiny Firmware: 2023.9.0-dev
Thanks!