CE Smart Switch Dimmer to ESPHome

Does anyone know if this switch can be flashed to ESPHome?

https://github.com/arendst/Sonoff-Tasmota/issues/4003

I have it using Tasmota right now however I keep having disconnect issues so I am looking to try something different without needing to use MQTT.
From what I have read I guess it is basically a Generic ESP8266, but as ESPHome doesn’t have pre-compiled binaries I am not really sure how I would go about setting up the correct gpio pins.

Lookup the template for the device. You can decide which pins are which with this wiki page

On that page is a link to the template DB too. If you need more help, let me know.

Hi Calica,

Thanks for the reply.
Looking at what I currently have selected in Tasmota,
GPIO13 is set to Tuya RX (108)
GPIO15 is set to Tuya Tx (107)

Does that mean I just need to add to the yaml?

switch:
  - platform: gpio
    name: "Basement"
    pin: 13
  - platform: gpio
    pin: 15

These are dimmable switches but I don’t see anything that mentions dimming int ESPHome

Sorry looks like I was wrong. Seems Tuya has a separate microcontroller that handles dimming functions and the ESP talks to that via the pins you specified. ESPHome doesn’t support this. Probably wouldn’t be too difficult to add, given that Tasmota supports it. Relevant code:

https://github.com/arendst/Sonoff-Tasmota/blob/development/sonoff/xdrv_16_tuyadimmer.ino

That’s quite a bit of effort tho.

Also, dimming is handled by light components.

if you’re still interested i got it working using the following:

# MS-105 serial communication
uart:
  rx_pin: GPIO13
  tx_pin: GPIO15
  baud_rate: 9600

# Register the Tuya MCU connection. Check your log for the correct values
tuya:

light:
  - platform: "tuya"
    name: "your_friendly_name"
    dimmer_datapoint: 3
    switch_datapoint: 1
    min_value: 25
    max_value: 255

How did you get this to work given that the TUYA MCU component in ESPHome is unidirectional except for ON/OFF???

I’ve requested a new feature to support this.