1
1
"""Quirks for Develco Products A/S."""
2
2
3
- from zigpy import types as t
3
+ from typing import Final
4
+
4
5
from zigpy .quirks import CustomCluster
6
+ import zigpy .types as t
5
7
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
8
9
9
10
from zhaquirks import PowerConfigurationCluster
10
11
@@ -20,21 +21,19 @@ class DevelcoPowerConfiguration(PowerConfigurationCluster):
20
21
21
22
22
23
class DevelcoIasZone (CustomCluster , IasZone ):
23
- """Custom IasZone for Develco ."""
24
+ """IAS Zone, patched to fix a bug with the status change notification command ."""
24
25
25
- class ClientCommandDefs (BaseCommandDefs ):
26
- """Client command definitions."""
26
+ class ClientCommandDefs (IasZone . ClientCommandDefs ):
27
+ """IAS Zone command definitions."""
27
28
28
- status_change_notification = foundation .ZCLCommandDef (
29
+ status_change_notification : Final = foundation .ZCLCommandDef (
29
30
id = 0x00 ,
30
31
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
33
35
"zone_id?" : t .uint8_t ,
34
36
"delay?" : t .uint16_t ,
35
37
},
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 ,
40
39
)
0 commit comments