From c914de348b380d1373997dbed206f822fcb5a1c7 Mon Sep 17 00:00:00 2001 From: Mario de Frutos Dieguez Date: Sun, 22 Sep 2024 16:47:05 +0200 Subject: [PATCH 1/3] Update for Tuya TS130F_TZ3000_qqdbccb3 This PR includes a new signature for the Zemismart curtain switch with reference WN2-EC1E because the current one doesn't work for this device. Signed-off-by: Mario de Frutos Dieguez --- zhaquirks/tuya/ts130f.py | 46 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/zhaquirks/tuya/ts130f.py b/zhaquirks/tuya/ts130f.py index 9364ae86e9..71aea08e36 100644 --- a/zhaquirks/tuya/ts130f.py +++ b/zhaquirks/tuya/ts130f.py @@ -164,6 +164,52 @@ class TuyaZemismartTS130F(CustomDevice): } +class TuyaZemismartWNEC1ETS130F(CustomDevice): + """Tuya ZemiSmart smart curtain roller shutter. WN-EC1E version.""" + + signature = { + # SizePrefixedSimpleDescriptor(endpoint=1, profile=104, device_type=0x0202, device_version=1, input_clusters=[0x0000, 0x0003, 0x0004, 0x0005, 0x0102], output_clusters=[0x0019])) + MODEL: "TS130F", + ENDPOINTS: { + 1: { + PROFILE_ID: zha.PROFILE_ID, + DEVICE_TYPE: zha.DeviceType.WINDOW_COVERING_DEVICE, + INPUT_CLUSTERS: [ + Basic.cluster_id, + Identify.cluster_id, + Groups.cluster_id, + Scenes.cluster_id, + OnOff.cluster_id, + WindowCovering.cluster_id, + ], + OUTPUT_CLUSTERS: [ + Time.cluster_id, + Ota.cluster_id, + ], + }, + }, + } + replacement = { + ENDPOINTS: { + 1: { + PROFILE_ID: zha.PROFILE_ID, + DEVICE_TYPE: zha.DeviceType.WINDOW_COVERING_DEVICE, + INPUT_CLUSTERS: [ + Basic.cluster_id, + Groups.cluster_id, + Scenes.cluster_id, + TuyaWithBacklightOnOffCluster, + TuyaCoveringCluster, + ], + OUTPUT_CLUSTERS: [ + Time.cluster_id, + Ota.cluster_id, + ], + }, + }, + } + + class TuyaTS130FTOGP(CustomDevice): """Tuya Oxt smart curtain roller shutter.""" From d8e9dbdddf11c57833b22c2941e8786160001f07 Mon Sep 17 00:00:00 2001 From: Mario de Frutos Date: Tue, 24 Sep 2024 13:32:41 +0200 Subject: [PATCH 2/3] Add missing Identify cluster in the replacement Signed-off-by: Mario de Frutos --- zhaquirks/tuya/ts130f.py | 1 + 1 file changed, 1 insertion(+) diff --git a/zhaquirks/tuya/ts130f.py b/zhaquirks/tuya/ts130f.py index 71aea08e36..5e00d0d725 100644 --- a/zhaquirks/tuya/ts130f.py +++ b/zhaquirks/tuya/ts130f.py @@ -196,6 +196,7 @@ class TuyaZemismartWNEC1ETS130F(CustomDevice): DEVICE_TYPE: zha.DeviceType.WINDOW_COVERING_DEVICE, INPUT_CLUSTERS: [ Basic.cluster_id, + Identify.cluster_id, Groups.cluster_id, Scenes.cluster_id, TuyaWithBacklightOnOffCluster, From c1eac1c5fa96c9ce09abe9e403115179e867aa54 Mon Sep 17 00:00:00 2001 From: TheJulianJES Date: Tue, 24 Sep 2024 21:10:57 +0200 Subject: [PATCH 3/3] Remove SizePrefixedSimpleDescriptor comment --- zhaquirks/tuya/ts130f.py | 1 - 1 file changed, 1 deletion(-) diff --git a/zhaquirks/tuya/ts130f.py b/zhaquirks/tuya/ts130f.py index 5e00d0d725..06a2ed3c7e 100644 --- a/zhaquirks/tuya/ts130f.py +++ b/zhaquirks/tuya/ts130f.py @@ -168,7 +168,6 @@ class TuyaZemismartWNEC1ETS130F(CustomDevice): """Tuya ZemiSmart smart curtain roller shutter. WN-EC1E version.""" signature = { - # SizePrefixedSimpleDescriptor(endpoint=1, profile=104, device_type=0x0202, device_version=1, input_clusters=[0x0000, 0x0003, 0x0004, 0x0005, 0x0102], output_clusters=[0x0019])) MODEL: "TS130F", ENDPOINTS: { 1: {