Bondo2
(Bondo2)
June 9, 2025, 9:21pm
1
I have the orange coloured Diivoo water timer with 2 valves. When I add it to Tuya integration, there is only one switch which controls the left valve.
I looked at Tuya developer link and added the device to it and there is only one switch, how does the app control both valves ?
Code from switch.py
# Smart Water Timer
"sfkzq": (
SwitchEntityDescription(
key=DPCode.SWITCH,
translation_key="switch",
"data": {
"endpoint": "https://apigw.tuyaus.com",
"terminal_id": "17494243685999rmEDR",
"mqtt_connected": true,
"disabled_by": null,
"disabled_polling": false,
"devices": [
{
"id": "eb693cdiizikexjp",
"name": "2-Zone Smart Water Timer 2",
"category": "sfkzq",
"product_id": "r6ya07uz",
"product_name": "2-Zone Smart Water Timer",
"online": true,
"sub": true,
"time_zone": "-04:00",
"active_time": "2025-06-08T23:59:22+00:00",
"create_time": "2025-06-08T23:59:22+00:00",
"update_time": "2025-06-08T23:59:22+00:00",
"function": {
"switch": {
"type": "Boolean",
"value": {}
},
Bondo2
(Bondo2)
June 10, 2025, 4:37pm
2
I was able to make it work. Steps:
create an account on https://platform.tuya.com
Create a new project
Add the device using Devices->link app account (use Smartlife app username/password)
Go to device debugging and there is a link at the top [product details], click on that
In the next screen switch " Select Control Instruction Mode" to DP Instruction and save
in HA got HACS and install this GitHub - lasry1/home-assistant-tuya-custom: ggq added and do not restart yet
Open the custom_components/tuya/switch.py on you HA (you can use the File editor)
Look for sfkaq
Remove that section and replace it with
# Smart Water Timer
"sfkzq": (
SwitchEntityDescription(
key=DPCode.SWITCH,
name="Switch",
icon="mdi:sprinkler-variant",
),
SwitchEntityDescription(
key=DPCode.SWITCH_2,
name="Switch_2",
icon="mdi:sprinkler-variant",
),
),
Save the file and restart HA
Go to settings devices and services and Add Tuya custom integration and configure it as you would normally
You can use my custom_component after doing steps 1-5
sfkzq modified to include 2 valves
Emb
June 15, 2025, 7:08am
3
Bondo2:
sfkaq
Thanks for the info.
I’m trying to use GitHub - lasry1/home-assistant-tuya-custom: ggq added just for the 1 switch controller Diivoo WT-03, which seems to be a sfkzq water timer (based on the Tuya debug data).
When I restarted HA I can see the old integration entry failed to bet setup, so I created a new one. When I did that I see the device, but the switch is not controllable, and the diagnostic valuse are all still unavailable.
where there any other suggestions involved it getting this to work?
Bondo2
(Bondo2)
June 15, 2025, 11:23pm
4
You need to use my repo (previous post) and follow the instructions in that repo to switch the device instructions.