Tuya Dimmer - Tasmota > ESPhome

Hello Community,

I have a tasmotized Tuya dimmer using TuyaConvert. I wanted to give ESPhome a shot. I installed the addon and compiled the following:

esphome:
  name: csmartdim
  platform: ESP8266
  board: esp01_1m

# Enable logging
logger:
  baud_rate: 0

# Enable Home Assistant API
api:

ota:
  password: "3793e165a8b72b0534fcb1676a2d6770"

wifi:
  ssid: "***"
  password: "***"

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Csmartdim Fallback Hotspot"
    password: "EATIN1f442vb"

captive_portal:

# My dimmer used the hardware serial port on the alternate pins
uart:
  rx_pin: GPIO13
  tx_pin: GPIO15
  baud_rate: 9600

# Register the Tuya MCU connection
tuya:

The validation gives:

INFO Reading configuration /config/esphome/csmartdim.yaml...
INFO Configuration is valid!
esphome:
  name: csmartdim
  platform: ESP8266
  board: esp01_1m
  arduino_version: platformio/[email protected]
  build_path: csmartdim
  platformio_options: {}
  esp8266_restore_from_flash: false
  board_flash_mode: dout
  includes: []
  libraries: []
  name_add_mac_suffix: false
logger:
  baud_rate: 0
  tx_buffer_size: 512
  hardware_uart: UART0
  level: DEBUG
  logs: {}
  esp8266_store_log_strings_in_flash: true
api:
  port: 6053
  password: ''
  reboot_timeout: 15min
ota:
  password: 3793e165a8b72b0534fcb1676a2d6770
  safe_mode: true
  port: 8266
  reboot_timeout: 5min
  num_attempts: 10
wifi:
  ap:
    ssid: Csmartdim Fallback Hotspot
    password: EATIN1f442vb
    ap_timeout: 1min
  enable_mdns: true
  domain: .local
  reboot_timeout: 15min
  power_save_mode: NONE
  fast_connect: false
  output_power: 20.0
  networks:
  - ssid: ***
    password: ***
    priority: 0.0
  use_address: csmartdim.local
captive_portal: {}
uart:
- rx_pin: 13
  tx_pin: 15
  baud_rate: 9600
  rx_buffer_size: 256
  stop_bits: 1
  data_bits: 8
  parity: NONE
tuya: {}

I had some errors to migrate, but found out I had to downgrade my Tasmota version. Successfully migrated and added the device via ESPHome integration using the device IP.

My question is how to configure it? I have only only light switch in HA, but it doesn’t do any action on the device. The dimmer has on/off, increase and decrease button.

I followed the guide on Tuya Dimmer : Tuya Dimmer — ESPHome

It seems I needed to enable webserver to log to the device directly.
Can anyone provide some guidance please? Thank you.

Even with baud_rate set to 0 it still logs over wifi.

I get the following error:

INFO Reading configuration /config/esphome/csmartdim.yaml...
INFO Starting log output from csmartdim.local using esphome API
WARNING Error resolving IP address of csmartdim.local. Is it connected to WiFi?
WARNING (If this error persists, please set a static IP address: https://esphome.io/components/wifi.html#manual-ips)
WARNING Initial connection failed. The ESP might not be connected to WiFi yet (Error resolving IP address: Error resolving address with mDNS: Did not respond. Maybe the device is offline., [Errno -5] No address associated with hostname). Re-Trying in 1 seconds
WARNING Exception occurred:
Traceback (most recent call last):
  File "/opt/esphome/esphome/zeroconf.py", line 492, in handle_read
    data, (addr, port) = socket_.recvfrom(_MAX_MSG_ABSOLUTE)
OSError: [Errno 9] Bad file descriptor
WARNING Error resolving IP address of csmartdim.local. Is it connected to WiFi?
WARNING (If this error persists, please set a static IP address: https://esphome.io/components/wifi.html#manual-ips)
WARNING Initial connection failed. The ESP might not be connected to WiFi yet (Error resolving IP address: Error resolving address with mDNS: Did not respond. Maybe the device is offline., [Errno -5] No address associated with hostname). Re-Trying in 1 seconds

Although pinging the device is successful, ESPhome cannot connect.