ESPHome Treatlife DS01C Dimmer - Multi Press Support

Has anyone using a Treatlife DS01C Dimmer been successful in getting on_multi_click to function? I’m not having any success and I am fearful that there is a hardware limitation that is preventing this.

device link: Treatlife DS01C Dimmer

  device_description: Treatlife DS01C Dimmer - Beken 1.1.17
  device_name: dimmer-wd05
  device_friendly_name: Dimmer WD05

## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
## Hopefully you do not NEED to edit below this line
## Be sure you have a secrets.yaml file with the following entries:
## wifi_ssid: "my2g-wifi-name"
## wifi_password: "my2g-wifi-password"
## wifi_ap_password: "ap-password"
## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

# Esphome core information
  name: $device_name
  friendly_name: $device_friendly_name
  comment: $device_description

# The board type for this device
  board: generic-bk7231t-qfn32-tuya

# Automatically logs all log messages, By default, all logs with a severity DEBUG or higher will be shown
# Increasing the log level severity (to e.g INFO or WARNING) can help with the performance of the application and memory size.
  level: VERBOSE
  baud_rate: 0
# Creata a simple web server on the node that can be accessed through any browser and a simple REST API

# Make the node announce itself on the local network using the multicast DNS (MDNS)

# ESPHome native API is used to communicate with clients directly, required for Home Assistant functionality

# Permit OTA (Over The Air) updates

# Setup the wifi connection, and configure a possible local access point
  ssid: !secret wifi_ssid
  password: !secret wifi_password
    ssid: $device_name
    password: !secret wifi_ap_password

# After 1 minute of unsuccessful WiFi connection attempts, the ESP will start a WiFi hotspot (with the credentials from ap configuration above)

# Report the WiFi Signal strength
  - platform: wifi_signal
    name: WiFi Signal
    update_interval: 60s
      - delta: 0.01
      - throttle: 300s

# Provide buttons to restart device in normal and Safe modes.
  - platform: restart
    name: "Restart"
    id: restart_normal
  - platform: safe_mode
    id: restart_safe
    name: "Restart (Safe Mode)"

# Report LibreTiny Version Information
  - platform: libretiny
      name: LibreTiny Version

# Confugure the UART for this device
# This is required to use the tuya component below
  rx_pin: RX1
  tx_pin: TX1
  baud_rate: 9600

# Register the Tuya MCU connection

# Configure the tuya dimmer
  - platform: "tuya"
    id: light_1
    name: "Dimmer"
    switch_datapoint: 1
    dimmer_datapoint: 2
    min_value_datapoint: 3
    min_value: 100
    max_value: 1000

  - platform: "tuya"
    id: Button1
    name: "Button Sensor"
    sensor_datapoint: 1
    - timing:
        - ON for at most 1s
        - OFF for at most 1s
        - ON for 0.5s to 1s
        - OFF for at least 0.2s
        - logger.log: "~~~~~~~~~~~~~~~~~~~~~~~ Double-Clicked"

Have you tried using on_double_click:? Slightly easier to configure (and execute).

I’m not sure that would work since it’s using tuya mcu

I did try this - I tried all the binary_sensor events - only press and state seem to work.

1 Like

I agree, it only seems to trigger a press/click when the internal relay flips. I do not think I can use multi-press with this device.

Can you recommend a good dimmer compatible with ESPHome that supports this?

There’s martin jerry dimmer

1 Like