From 06f1b2bcd9fb5dda6263346d27e0542af0ad3702 Mon Sep 17 00:00:00 2001 From: xuw Date: Sat, 20 Jun 2026 23:42:46 +0800 Subject: [PATCH] fix: set disableDefaultResponse for several Tuya switch modules These Tuya switches (TS0001_switch_module, TS0002_basic, TS0003_switch_module_2, TS0004, TS0011) frequently do not send a ZCL Default Response to on/off commands. With the response expected, zigbee-herdsman waits the full 10s command timeout for every command, which serializes per device and stacks badly when several gangs/lights are toggled in quick succession (e.g. via a scene or a multi-button remote) - commands appear to "hang" for many seconds even though the switch actuates. Setting meta.disableDefaultResponse makes on/off fire-and-forget; the new state is still confirmed by the device's own attribute reports. This is consistent with the existing TS0003 "_TZ3000_ouwfc1qj" variant which already sets meta.disableDefaultResponse. Verified on real devices (_TZ3000_/_TZ3210_ family): the outgoing command frame changes from disableDefaultResponse:false to true, the 10s timeouts disappear, and attribute-report based state is unaffected. Co-Authored-By: Claude Opus 4.8 --- src/devices/tuya.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/devices/tuya.ts b/src/devices/tuya.ts index 80b2abbe26e3c..dcf8112a5d06e 100644 --- a/src/devices/tuya.ts +++ b/src/devices/tuya.ts @@ -7036,7 +7036,7 @@ export const definitions: DefinitionWithExtend[] = [ endpoint: (device) => { return {l1: 1, l2: 2}; }, - meta: {multiEndpoint: true}, + meta: {multiEndpoint: true, disableDefaultResponse: true}, configure: async (device, coordinatorEndpoint) => { await tuya.configureMagicPacket(device, coordinatorEndpoint); @@ -7286,7 +7286,7 @@ export const definitions: DefinitionWithExtend[] = [ endpoint: (device) => { return {l1: 1, l2: 2, l3: 3}; }, - meta: {multiEndpoint: true}, + meta: {multiEndpoint: true, disableDefaultResponse: true}, configure: async (device, coordinatorEndpoint) => { await tuya.configureMagicPacket(device, coordinatorEndpoint); await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ["genOnOff"]); @@ -7436,6 +7436,7 @@ export const definitions: DefinitionWithExtend[] = [ inchingSwitch: (m) => m === "_TZ3000_afgzktgb", }), ], + meta: {disableDefaultResponse: true}, configure: async (device, coordinatorEndpoint) => { await tuya.configureMagicPacket(device, coordinatorEndpoint); await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ["genOnOff"]); @@ -11010,6 +11011,7 @@ export const definitions: DefinitionWithExtend[] = [ {vendor: "Mercator Ikuü", model: "SSW01"}, tuya.whitelabel("Nous", "LZ3", "Smart water/gas valve", ["_TZ3000_abjodzas"]), ], + meta: {disableDefaultResponse: true}, configure: async (device, coordinatorEndpoint) => { await tuya.configureMagicPacket(device, coordinatorEndpoint); await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ["genOnOff"]); @@ -11267,6 +11269,7 @@ export const definitions: DefinitionWithExtend[] = [ tuya.whitelabel("Nova Digital", "SA-4", "Safira smart light switch - 4 gang", ["_TZ3000_iymfxdis"]), tuya.whitelabel("AVATTO", "ZBTS60-04", "4 gang switch module with backlight", ["_TZ3000_r9e2w7dn"]), ], + meta: {disableDefaultResponse: true}, configure: async (device, coordinatorEndpoint) => { await tuya.configureMagicPacket(device, coordinatorEndpoint); await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ["genOnOff"]);