Skip to content

Commit a7f4859

Browse files
authored
Add quirks for new Sinopé Load Controller (#3195)
1 parent 6907545 commit a7f4859

File tree

4 files changed

+90
-21
lines changed

4 files changed

+90
-21
lines changed

zhaquirks/sinope/light.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class SinopeTechnologiesManufacturerCluster(CustomCluster):
4242
"""SinopeTechnologiesManufacturerCluster manufacturer cluster."""
4343

4444
class KeypadLock(t.enum8):
45-
"""keypad_lockout values."""
45+
"""Keypad_lockout values."""
4646

4747
Unlocked = 0x00
4848
Locked = 0x01
@@ -61,7 +61,7 @@ class DoubleFull(t.enum8):
6161
On = 0x01
6262

6363
class Action(t.enum8):
64-
"""action_report values."""
64+
"""Action_report values."""
6565

6666
Single_on = 0x01
6767
Single_release_on = 0x02

zhaquirks/sinope/sensor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class SinopeTechnologiesIasZoneCluster(CustomCluster, IasZone):
5252
"""SinopeTechnologiesIasZoneCluster custom cluster."""
5353

5454
class LeakStatus(t.enum8):
55-
"""leak_status values."""
55+
"""Leak_status values."""
5656

5757
Dry = 0x00
5858
Leak = 0x01

zhaquirks/sinope/switch.py

Lines changed: 68 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class SinopeManufacturerCluster(CustomCluster):
5151
"""SinopeManufacturerCluster manufacturer cluster."""
5252

5353
class KeypadLock(t.enum8):
54-
"""keypad_lockout values."""
54+
"""Keypad_lockout values."""
5555

5656
Unlocked = 0x00
5757
Locked = 0x01
@@ -70,6 +70,7 @@ class AlarmAction(t.enum8):
7070
Notify = 0x01
7171
Close = 0x02
7272
Close_notify = 0x03
73+
No_flow = 0x04
7374

7475
class PowerSource(t.uint32_t):
7576
"""Valve power source types."""
@@ -93,7 +94,7 @@ class AbnormalAction(t.bitmap16):
9394
Close_notify = 0x0003
9495

9596
class ColdStatus(t.enum8):
96-
"""cold_load_pickup_status values."""
97+
"""Cold_load_pickup_status values."""
9798

9899
Active = 0x00
99100
Off = 0x01
@@ -188,14 +189,14 @@ class CustomMeteringCluster(CustomCluster, Metering):
188189
"""Custom Metering Cluster."""
189190

190191
class ValveStatus(t.bitmap8):
191-
"""valve_status."""
192+
"""Valve_status."""
192193

193194
Off = 0x00
194195
Off_armed = 0x01
195196
On = 0x02
196197

197198
class UnitOfMeasure(t.enum8):
198-
"""unit_of_measure."""
199+
"""Unit_of_measure."""
199200

200201
KWh = 0x00
201202
Lh = 0x07
@@ -326,6 +327,67 @@ class SinopeTechnologiesLoadController(CustomDevice):
326327
}
327328

328329

330+
class SinopeTechnologiesLoadController_V2(CustomDevice):
331+
"""SinopeTechnologiesLoadController version 2 custom device."""
332+
333+
signature = {
334+
# <SimpleDescriptor(endpoint=1, profile=260,
335+
# device_type=2, device_version=0,
336+
# input_clusters=[0, 2, 3, 4, 5, 6, 1794, 2820, 2821, 65281]
337+
# output_clusters=[3, 4, 25]>
338+
MODELS_INFO: [
339+
(SINOPE, "RM3250ZB"),
340+
],
341+
ENDPOINTS: {
342+
1: {
343+
PROFILE_ID: zha_p.PROFILE_ID,
344+
DEVICE_TYPE: zha_p.DeviceType.ON_OFF_OUTPUT,
345+
INPUT_CLUSTERS: [
346+
Basic.cluster_id,
347+
DeviceTemperature.cluster_id,
348+
Identify.cluster_id,
349+
Groups.cluster_id,
350+
Scenes.cluster_id,
351+
OnOff.cluster_id,
352+
Metering.cluster_id,
353+
ElectricalMeasurement.cluster_id,
354+
Diagnostic.cluster_id,
355+
SINOPE_MANUFACTURER_CLUSTER_ID,
356+
],
357+
OUTPUT_CLUSTERS: [
358+
Identify.cluster_id,
359+
Groups.cluster_id,
360+
Ota.cluster_id,
361+
],
362+
}
363+
},
364+
}
365+
366+
replacement = {
367+
ENDPOINTS: {
368+
1: {
369+
INPUT_CLUSTERS: [
370+
Basic.cluster_id,
371+
CustomDeviceTemperatureCluster,
372+
Identify.cluster_id,
373+
Groups.cluster_id,
374+
Scenes.cluster_id,
375+
OnOff.cluster_id,
376+
Metering.cluster_id,
377+
ElectricalMeasurement.cluster_id,
378+
Diagnostic.cluster_id,
379+
SinopeManufacturerCluster,
380+
],
381+
OUTPUT_CLUSTERS: [
382+
Identify.cluster_id,
383+
Groups.cluster_id,
384+
Ota.cluster_id,
385+
],
386+
}
387+
}
388+
}
389+
390+
329391
class SinopeTechnologiesValve(CustomDevice):
330392
"""SinopeTechnologiesValve custom device."""
331393

@@ -605,8 +667,8 @@ class SinopeTechnologiesCalypso(CustomDevice):
605667
}
606668

607669

608-
class SinopeTechnologiesNewSwitch(CustomDevice):
609-
"""SinopeTechnologiesNewSwitch custom device."""
670+
class SinopeTechnologiesSwitch_V2(CustomDevice):
671+
"""SinopeTechnologiesSwitch version 2 custom device."""
610672

611673
signature = {
612674
# <SimpleDescriptor(endpoint=1, profile=260,

zhaquirks/sinope/thermostat.py

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,27 +37,27 @@ class SinopeTechnologiesManufacturerCluster(CustomCluster):
3737
"""SinopeTechnologiesManufacturerCluster manufacturer cluster."""
3838

3939
class KeypadLock(t.enum8):
40-
"""keypad_lockout values."""
40+
"""Keypad_lockout values."""
4141

4242
Unlocked = 0x00
4343
Locked = 0x01
4444
Partial_lock = 0x02
4545

4646
class Display(t.enum8):
47-
"""config_2nd_display values."""
47+
"""Config_2nd_display values."""
4848

4949
Auto = 0x00
5050
Setpoint = 0x01
5151
Outside_temperature = 0x02
5252

5353
class FloorMode(t.enum8):
54-
"""air_floor_mode values."""
54+
"""Air_floor_mode values."""
5555

5656
Air_by_floor = 0x01
5757
Floor = 0x02
5858

5959
class AuxMode(t.enum8):
60-
"""aux_output_mode values."""
60+
"""Aux_output_mode values."""
6161

6262
Off = 0x00
6363
On = 0x01
@@ -77,25 +77,25 @@ class LimitStatus(t.uint8_t):
7777
Max_air_reached = 0x03
7878

7979
class SensorType(t.enum8):
80-
"""temp_sensor_type values."""
80+
"""Temp_sensor_type values."""
8181

8282
Sensor_10k = 0x00
8383
Sensor_12k = 0x01
8484

8585
class TimeFormat(t.enum8):
86-
"""time_format values."""
86+
"""Time_format values."""
8787

8888
Format_24h = 0x00
8989
Format_12h = 0x01
9090

9191
class GfciStatus(t.enum8):
92-
"""gfci_status values."""
92+
"""Gfci_status values."""
9393

9494
Ok = 0x00
9595
Error = 0x01
9696

9797
class SystemMode(t.enum8):
98-
"""system mode values."""
98+
"""System mode values."""
9999

100100
Off = 0x00
101101
Auto = 0x01
@@ -112,6 +112,12 @@ class PumpDuration(t.enum8):
112112
T30 = 0x1E
113113
T60 = 0x3C
114114

115+
class CycleLength(t.uint16_t):
116+
""""Cycle length, 15 sec (15) or 15 min (900 sec)."""
117+
118+
Sec_15 = 0x000F
119+
Min_15 = 0x0384
120+
115121
cluster_id = SINOPE_MANUFACTURER_CLUSTER_ID
116122
name = "Sinopé Technologies Manufacturer specific"
117123
ep_attribute = "sinope_manufacturer_specific"
@@ -140,14 +146,15 @@ class PumpDuration(t.enum8):
140146
0x010D: ("room_temperature", t.int16s, True),
141147
0x0114: ("time_format", TimeFormat, True),
142148
0x0115: ("gfci_status", GfciStatus, True),
143-
0x0116: ("aux_mode", SystemMode, True),
149+
0x0116: ("hvac_mode", SystemMode, True),
144150
0x0118: ("aux_connected_load", t.uint16_t, True),
145151
0x0119: ("connected_load", t.uint16_t, True),
146152
0x0128: ("pump_protection_status", PumpStatus, True),
147153
0x012A: ("pump_protection_duration", PumpDuration, True),
148154
0x012B: ("current_setpoint", t.int16s, True),
149155
0x012D: ("report_local_temperature", t.int16s, True),
150156
0x0200: ("status", t.bitmap32, True),
157+
0x0281: ("cycle_length", CycleLength, True),
151158
0xFFFD: ("cluster_revision", t.uint16_t, True),
152159
}
153160

@@ -156,20 +163,20 @@ class SinopeTechnologiesThermostatCluster(CustomCluster, Thermostat):
156163
"""SinopeTechnologiesThermostatCluster custom cluster."""
157164

158165
class Occupancy(t.enum8):
159-
"""set_occupancy values."""
166+
"""Set_occupancy values."""
160167

161168
Away = 0x00
162169
Home = 0x01
163170

164171
class Backlight(t.enum8):
165-
"""backlight_auto_dim_param values."""
172+
"""Backlight_auto_dim_param values."""
166173

167174
On_demand = 0x00
168175
Always_on = 0x01
169176
Bedroom = 0x02
170177

171178
class CycleOutput(t.uint16_t):
172-
"""main and aux cycle period values."""
179+
"""Main and aux cycle period values."""
173180

174181
Sec_15 = 0x000F
175182
Min_5 = 0x012C

0 commit comments

Comments
 (0)