Skip to content

Commit bbc5473

Browse files
authored
Support Frient devices (#4056)
1 parent 6513d39 commit bbc5473

15 files changed

+411
-1349
lines changed

tests/test_develco.py

Lines changed: 0 additions & 88 deletions
This file was deleted.

zhaquirks/develco/__init__.py

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
"""Quirks for Develco Products A/S."""
22

3-
from zigpy import types as t
3+
from typing import Final
4+
45
from zigpy.quirks import CustomCluster
6+
import zigpy.types as t
57
from zigpy.zcl import foundation
6-
from zigpy.zcl.clusters.security import IasZone
7-
from zigpy.zcl.foundation import BaseCommandDefs
8+
from zigpy.zcl.clusters.security import IasZone, ZoneStatus
89

910
from zhaquirks import PowerConfigurationCluster
1011

@@ -20,21 +21,19 @@ class DevelcoPowerConfiguration(PowerConfigurationCluster):
2021

2122

2223
class DevelcoIasZone(CustomCluster, IasZone):
23-
"""Custom IasZone for Develco."""
24+
"""IAS Zone, patched to fix a bug with the status change notification command."""
2425

25-
class ClientCommandDefs(BaseCommandDefs):
26-
"""Client command definitions."""
26+
class ClientCommandDefs(IasZone.ClientCommandDefs):
27+
"""IAS Zone command definitions."""
2728

28-
status_change_notification = foundation.ZCLCommandDef(
29+
status_change_notification: Final = foundation.ZCLCommandDef(
2930
id=0x00,
3031
schema={
31-
"zone_status": IasZone.ZoneStatus,
32-
"extended_status?": t.bitmap8,
32+
"zone_status": ZoneStatus,
33+
"extended_status": t.bitmap8,
34+
# These two should not be optional
3335
"zone_id?": t.uint8_t,
3436
"delay?": t.uint16_t,
3537
},
36-
)
37-
enroll = foundation.ZCLCommandDef(
38-
id=0x01,
39-
schema={"zone_type": IasZone.ZoneType, "manufacturer_code": t.uint16_t},
38+
direction=foundation.Direction.Client_to_Server,
4039
)

0 commit comments

Comments
 (0)