From 34f235a7db0174191621d4d39713e924c1044420 Mon Sep 17 00:00:00 2001 From: Nikolai Dalynchyk Date: Fri, 31 Mar 2023 17:07:32 +0200 Subject: [PATCH 1/7] Fix Tuya `_TZE200_t1blo2bj` siren toggle switch (#2312) --- zhaquirks/tuya/ts0601_siren.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zhaquirks/tuya/ts0601_siren.py b/zhaquirks/tuya/ts0601_siren.py index d05ad16445..0e549f2294 100644 --- a/zhaquirks/tuya/ts0601_siren.py +++ b/zhaquirks/tuya/ts0601_siren.py @@ -293,7 +293,7 @@ async def command( endpoint_id=self.endpoint.endpoint_id, cluster_name=self.ep_attribute, cluster_attr="on_off", - attr_value=command_id, + attr_value=bool(command_id), expect_reply=expect_reply, manufacturer=foundation.ZCLHeader.NO_MANUFACTURER_ID, ) From 8d48ee03b24cb516091ace6466d3fe4dd8ad80e2 Mon Sep 17 00:00:00 2001 From: cwhitmorebeirne <108819863+cwhitmorebeirne@users.noreply.github.com> Date: Sat, 1 Apr 2023 02:16:25 +1100 Subject: [PATCH 2/7] Add Tuya Mercator IKUU SSWRM-ZB dimmer support (#2310) * Update ts0601_dimmer.py Add support for Mercator IKUU SSWRM-ZB Rotary Dimmer Mechanism as per Issue #2307 * Update ts0601_dimmer.py Shortened description in attempt to fix the Black check. --- zhaquirks/tuya/ts0601_dimmer.py | 1 + 1 file changed, 1 insertion(+) diff --git a/zhaquirks/tuya/ts0601_dimmer.py b/zhaquirks/tuya/ts0601_dimmer.py index d6c71d6441..5c0932b6f0 100644 --- a/zhaquirks/tuya/ts0601_dimmer.py +++ b/zhaquirks/tuya/ts0601_dimmer.py @@ -48,6 +48,7 @@ class TuyaSingleSwitchDimmer(TuyaDimmerSwitch): ("_TZE200_la2c2uo9", "TS0601"), ("_TZE200_1agwnems", "TS0601"), # TODO: validation pending? ("_TZE200_9cxuhakf", "TS0601"), # Added for Mercator IKUU SSWM-DIMZ Device + ("_TZE200_a0syesf5", "TS0601"), # Added for Mercator IKUU SSWRM-ZB ("_TZE200_p0gzbqct", "TS0601"), ("_TZE200_w4cryh2i", "TS0601"), ], From be0fc65d9b074406bb16e43e5b0decc3665ed84f Mon Sep 17 00:00:00 2001 From: maxustm Date: Fri, 31 Mar 2023 18:23:33 +0300 Subject: [PATCH 3/7] Add Tuya T&H sensor Roximo SZTH02 support (#2309) Update ts0601_sensor.py add new sensor model --- zhaquirks/tuya/ts0601_sensor.py | 1 + 1 file changed, 1 insertion(+) diff --git a/zhaquirks/tuya/ts0601_sensor.py b/zhaquirks/tuya/ts0601_sensor.py index 4f255a5360..0034f53b9b 100644 --- a/zhaquirks/tuya/ts0601_sensor.py +++ b/zhaquirks/tuya/ts0601_sensor.py @@ -184,6 +184,7 @@ class TuyaTempHumiditySensorVar03(CustomDevice): ("_TZE200_yjjdcqsq", "TS0601"), ("_TZE200_9yapgbuv", "TS0601"), ("_TZE200_qyflbnbj", "TS0601"), + ("_TZE200_utkemkbs", "TS0601"), ], ENDPOINTS: { 1: { From db3288dd0387331178b6b7d02a5558424aee6124 Mon Sep 17 00:00:00 2001 From: TheJulianJES Date: Mon, 3 Apr 2023 15:31:05 +0200 Subject: [PATCH 4/7] Address Tuya `EnchantedDevice` inheritance for remotes (#2316) `EnchantedDevice` already inherits from `CustomDevice`. --- zhaquirks/tuya/ts004f.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/zhaquirks/tuya/ts004f.py b/zhaquirks/tuya/ts004f.py index 1d41678723..39684f12e0 100644 --- a/zhaquirks/tuya/ts004f.py +++ b/zhaquirks/tuya/ts004f.py @@ -4,7 +4,6 @@ import logging from zigpy.profiles import zha -from zigpy.quirks import CustomDevice from zigpy.zcl.clusters.general import ( Basic, Groups, @@ -67,7 +66,7 @@ _LOGGER = logging.getLogger(__name__) -class TuyaSmartRemote004FROK(EnchantedDevice, CustomDevice): +class TuyaSmartRemote004FROK(EnchantedDevice): """Tuya Smart (rotating) Knob device.""" signature = { @@ -186,7 +185,7 @@ class TuyaSmartRemote004FROK(EnchantedDevice, CustomDevice): } -class TuyaSmartRemote004FDMS(EnchantedDevice, CustomDevice): +class TuyaSmartRemote004FDMS(EnchantedDevice): """Tuya 4 btton dimmer switch / remote device.""" signature = { @@ -320,7 +319,7 @@ class TuyaSmartRemote004FDMS(EnchantedDevice, CustomDevice): } -class TuyaSmartRemote004F(EnchantedDevice, CustomDevice): +class TuyaSmartRemote004F(EnchantedDevice): """Tuya 4-button New version remote device.""" signature = { From 3ef5da3aa127b9c8d6d21f68419f5323a3dc836f Mon Sep 17 00:00:00 2001 From: MattWestb <49618193+MattWestb@users.noreply.github.com> Date: Fri, 7 Apr 2023 22:53:06 +0200 Subject: [PATCH 5/7] Fix IKEA "open/close remote" events (#2320) --- zhaquirks/ikea/opencloseremote.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zhaquirks/ikea/opencloseremote.py b/zhaquirks/ikea/opencloseremote.py index ba2da52123..a21f38d41f 100644 --- a/zhaquirks/ikea/opencloseremote.py +++ b/zhaquirks/ikea/opencloseremote.py @@ -65,7 +65,7 @@ def handle_cluster_request( We just want to keep track of direction, to associate it with the stop command. """ - cmd_name = self.server_commands.get(hdr.command_id, [hdr.command_id])[0] + cmd_name = self.server_commands[hdr.command_id].name if cmd_name == COMMAND_OPEN: self._is_closing = False elif cmd_name == COMMAND_CLOSE: From 62062d3b0d4e26169094a35d3c31fabf327108c6 Mon Sep 17 00:00:00 2001 From: TheJulianJES Date: Fri, 7 Apr 2023 23:00:47 +0200 Subject: [PATCH 6/7] Fix Tuya math domain error for illuminance (#2322) --- zhaquirks/tuya/ts0601_motion.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zhaquirks/tuya/ts0601_motion.py b/zhaquirks/tuya/ts0601_motion.py index 649a9394bc..e1d680f718 100644 --- a/zhaquirks/tuya/ts0601_motion.py +++ b/zhaquirks/tuya/ts0601_motion.py @@ -191,7 +191,7 @@ class MmwRadarManufCluster(TuyaMCUCluster): 104: DPToAttributeMapping( TuyaIlluminanceMeasurement.ep_attribute, "measured_value", - lambda x: 10000 * math.log10(x) + 1, + lambda x: 10000 * math.log10(x) + 1 if x != 0 else 0, ), 105: DPToAttributeMapping( TuyaMCUCluster.ep_attribute, From 4998d64d074e25e26b5c464b63446cfcbb7c0194 Mon Sep 17 00:00:00 2001 From: David Mulcahey Date: Fri, 7 Apr 2023 17:09:34 -0400 Subject: [PATCH 7/7] bump version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index dd3a7a6c9c..bc00e30c82 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ from setuptools import find_packages, setup -VERSION = "0.0.95" +VERSION = "0.0.96" setup(