TreatLife 3 Way Smart Dimmer Switch (DS02S)
A 3 way smart switch with dimmer.
This allows you to turn on and off a light with dimming capabilities
This device was originally supported by Tasmota (Tasmota Docs).
Pretty straight forward to get this flashed to OpenBeken. The below image shows the pinout and the important MCU reset pull low. Connect 3.3V power, ground, your tx/rx pins and pull the MCU's nReset pin low (MCU Datasheet) and then flash using the flash tool BK7231GUIFlashTool (BK7231GUIFlashTool).
.
Below is an excerpt from the Tasmota docs showing the dpid values.
Here is the completed autoexec.bat script (many thanks to p.kaczmarek2!)
Here is how to setup for Home Assistant

A 3 way smart switch with dimmer.
This allows you to turn on and off a light with dimming capabilities
This device was originally supported by Tasmota (Tasmota Docs).
Pretty straight forward to get this flashed to OpenBeken. The below image shows the pinout and the important MCU reset pull low. Connect 3.3V power, ground, your tx/rx pins and pull the MCU's nReset pin low (MCU Datasheet) and then flash using the flash tool BK7231GUIFlashTool (BK7231GUIFlashTool).

Below is an excerpt from the Tasmota docs showing the dpid values.
The “DpId”:1 line shows the switch’s on/off status
“DpId”:2 shows the current brightness value (you have to convert it from HEX to decimal and divide by 10 get the percentage: “DpIdData”:”00000182” converts from HEX 182 to decimal 386/10=38.6%.
“DpId”:3 shows the current minimum brightness (also need to convert from HEX to decimal and divide by ten: “DpIdData”:”0000000A” = 1.0%)
“DpId”:4 shows the current dimmer mode (00 is definitely “Mode 1” from the stock Tuya/Smart Life firmware).
Here is the completed autoexec.bat script (many thanks to p.kaczmarek2!)
startDriver TuyaMCU
//tuyaMcu_setBaudRate 115200 // This syncs the MCU baudrate. If soft controls are not working, try uncommenting this line.
setChannelType 1 toggle
setChannelType 2 dimmer
tuyaMcu_setDimmerRange 0 1000
linkTuyaMCUOutputToChannel 1 1 1
linkTuyaMCUOutputToChannel 2 2 2
Here is how to setup for Home Assistant
mqtt:
light:
- name: "<Name to display in home assistant>"
state_topic: "<client topic>/1/get"
command_topic: "<client topic>/1/set"
brightness_command_topic: "<client topic>/2/set"
brightness_state_topic: "<client topic>/2/get"
qos: 1
payload_on: 1
payload_off: 0
retain: true
optimistic: true