From ab0d248defda933019c98ddab451b5969fe99c16 Mon Sep 17 00:00:00 2001 From: Claude Gelinas Date: Sun, 4 Feb 2024 13:55:34 -0500 Subject: [PATCH] Fix Sinope custom attribute values (#2963) * Fix wrong definition for attribute values * Add Partial_lock value for keypadLock * Add battery_type attribute * Add Partial_lock and Bedroom attributes values --- zhaquirks/sinope/sensor.py | 1 + zhaquirks/sinope/switch.py | 1 + zhaquirks/sinope/thermostat.py | 6 ++++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/zhaquirks/sinope/sensor.py b/zhaquirks/sinope/sensor.py index 0ed68f5e77..3fea113764 100644 --- a/zhaquirks/sinope/sensor.py +++ b/zhaquirks/sinope/sensor.py @@ -42,6 +42,7 @@ class SinopeManufacturerCluster(CustomCluster): 0x0032: ("min_temperature_limit", t.int16s, True), 0x0033: ("max_temperature_limit", t.int16s, True), 0x0034: ("device_status", t.bitmap8, True), + 0x0036: ("battery_type", t.uint16_t, True), 0x0200: ("status", t.bitmap32, True), 0xFFFD: ("cluster_revision", t.uint16_t, True), } diff --git a/zhaquirks/sinope/switch.py b/zhaquirks/sinope/switch.py index f748fad95d..fa40d7303a 100644 --- a/zhaquirks/sinope/switch.py +++ b/zhaquirks/sinope/switch.py @@ -55,6 +55,7 @@ class KeypadLock(t.enum8): Unlocked = 0x00 Locked = 0x01 + Partial_lock = 0x02 class FlowAlarm(t.enum8): """Abnormal flow alarm.""" diff --git a/zhaquirks/sinope/thermostat.py b/zhaquirks/sinope/thermostat.py index 1ec03eeb74..946eed6f73 100644 --- a/zhaquirks/sinope/thermostat.py +++ b/zhaquirks/sinope/thermostat.py @@ -41,6 +41,7 @@ class KeypadLock(t.enum8): Unlocked = 0x00 Locked = 0x01 + Partial_lock = 0x02 class Display(t.enum8): """config_2nd_display values.""" @@ -157,14 +158,15 @@ class SinopeTechnologiesThermostatCluster(CustomCluster, Thermostat): class Occupancy(t.enum8): """set_occupancy values.""" - Home = 0x00 - Away = 0x01 + Away = 0x00 + Home = 0x01 class Backlight(t.enum8): """backlight_auto_dim_param values.""" On_demand = 0x00 Always_on = 0x01 + Bedroom = 0x02 class CycleOutput(t.uint16_t): """main and aux cycle period values."""