From d4a851088d1efcb57078b716588429ec02b906f7 Mon Sep 17 00:00:00 2001 From: hyteplus Date: Tue, 18 Mar 2025 16:31:55 +0800 Subject: [PATCH] Update tuya.ts Add backlight on/off --- src/devices/tuya.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/devices/tuya.ts b/src/devices/tuya.ts index 57f3cee7630f4..7998a86724a20 100644 --- a/src/devices/tuya.ts +++ b/src/devices/tuya.ts @@ -7524,13 +7524,14 @@ export const definitions: DefinitionWithExtend[] = [ fingerprint: tuya.fingerprint("TS0726", ["_TZ3000_qhyadm57"]), model: "TS0726_4_gang_switch_and_2_scene", vendor: "Tuya", - description: "4 gang switch and 2 scene", + description: "4 gang switch and 2 scene with backlight", fromZigbee: [fz.on_off, tuya.fz.power_on_behavior_2, fz.ignore_basic_report, fzLocal.TS0726_action], - toZigbee: [tz.on_off, tuya.tz.power_on_behavior_2, tzLocal.TS0726_switch_mode], + toZigbee: [tz.on_off, tuya.tz.power_on_behavior_2, tzLocal.TS0726_switch_mode, tuya.tz.backlight_indicator_mode_2], exposes: [ ...[1, 2, 3, 4].map((ep) => e.switch().withEndpoint(`l${ep}`)), ...[1, 2, 3, 4].map((ep) => e.power_on_behavior().withEndpoint(`l${ep}`)), ...[1, 2, 3, 4].map((ep) => e.enum("switch_mode", ea.STATE_SET, ["switch", "scene"]).withEndpoint(`l${ep}`)), + tuya.exposes.backlightModeOffOn().withAccess(ea.STATE_SET), e.action(["scene_1", "scene_2", "scene_3", "scene_4", "scene_5", "scene_6"]), ], endpoint: (device) => {