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
substitutions:
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
esphome:
name: $device_name
friendly_name: $device_friendly_name
comment: $device_description
# The board type for this device
bk72xx:
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.
logger:
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
web_server:
# Make the node announce itself on the local network using the multicast DNS (MDNS)
mdns:
# ESPHome native API is used to communicate with clients directly, required for Home Assistant functionality
api:
# Permit OTA (Over The Air) updates
ota:
# Setup the wifi connection, and configure a possible local access point
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
ap:
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)
captive_portal:
# Report the WiFi Signal strength
sensor:
- platform: wifi_signal
name: WiFi Signal
update_interval: 60s
filters:
- delta: 0.01
- throttle: 300s
# Provide buttons to restart device in normal and Safe modes.
button:
- platform: restart
name: "Restart"
id: restart_normal
- platform: safe_mode
id: restart_safe
name: "Restart (Safe Mode)"
# Report LibreTiny Version Information
text_sensor:
- platform: libretiny
version:
name: LibreTiny Version
# Confugure the UART for this device
# This is required to use the tuya component below https://bit.ly/3RdZuiM
uart:
rx_pin: RX1
tx_pin: TX1
baud_rate: 9600
# Register the Tuya MCU connection
tuya:
# Configure the tuya dimmer https://bit.ly/46oyqle
light:
- platform: "tuya"
id: light_1
name: "Dimmer"
switch_datapoint: 1
dimmer_datapoint: 2
min_value_datapoint: 3
min_value: 100
max_value: 1000
binary_sensor:
- platform: "tuya"
id: Button1
name: "Button Sensor"
sensor_datapoint: 1
on_multi_click:
- timing:
- ON for at most 1s
- OFF for at most 1s
- ON for 0.5s to 1s
- OFF for at least 0.2s
then:
- logger.log: "~~~~~~~~~~~~~~~~~~~~~~~ Double-Clicked"