Skip to content

Commit fd25f53

Browse files
add siren and mute for heiman smoke alarm (#1296)
1 parent 9e34762 commit fd25f53

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

matter_server/common/custom_clusters.py

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -664,13 +664,21 @@ def descriptor(cls) -> ClusterObjectDescriptor:
664664
ClusterObjectFieldDescriptor(
665665
Label="sensorType", Tag=0x00120B0013, Type=uint
666666
),
667+
ClusterObjectFieldDescriptor(
668+
Label="sirenActive", Tag=0x00120B0014, Type=uint
669+
),
670+
ClusterObjectFieldDescriptor(
671+
Label="alarmMute", Tag=0x00120B0015, Type=uint
672+
),
667673
]
668674
)
669675

670676
tamperAlarm: uint | None = None
671677
preheatingState: uint | None = None
672678
noDisturbingState: uint | None = None
673679
sensorType: uint | None = None
680+
sirenActive: uint | None = None
681+
alarmMute: uint | None = None
674682

675683
class Attributes:
676684
"""Attributes for the Heiman Cluster."""
@@ -761,6 +769,48 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
761769

762770
value: uint = 0
763771

772+
@dataclass
773+
class SirenActive(ClusterAttributeDescriptor, CustomClusterAttributeMixin):
774+
"""SirenActive Attribute within the Heiman Cluster."""
775+
776+
@ChipUtility.classproperty
777+
def cluster_id(cls) -> int:
778+
"""Return cluster id."""
779+
return 0x120BFC01
780+
781+
@ChipUtility.classproperty
782+
def attribute_id(cls) -> int:
783+
"""Return attribute id."""
784+
return 0x00120B0014
785+
786+
@ChipUtility.classproperty
787+
def attribute_type(cls) -> ClusterObjectFieldDescriptor:
788+
"""Return attribute type."""
789+
return ClusterObjectFieldDescriptor(Type=uint)
790+
791+
value: uint = 0
792+
793+
@dataclass
794+
class AlarmMute(ClusterAttributeDescriptor, CustomClusterAttributeMixin):
795+
"""AlarmMute Attribute within the Heiman Cluster."""
796+
797+
@ChipUtility.classproperty
798+
def cluster_id(cls) -> int:
799+
"""Return cluster id."""
800+
return 0x120BFC01
801+
802+
@ChipUtility.classproperty
803+
def attribute_id(cls) -> int:
804+
"""Return attribute id."""
805+
return 0x00120B0015
806+
807+
@ChipUtility.classproperty
808+
def attribute_type(cls) -> ClusterObjectFieldDescriptor:
809+
"""Return attribute type."""
810+
return ClusterObjectFieldDescriptor(Type=uint)
811+
812+
value: uint = 0
813+
764814

765815
@dataclass
766816
class ThirdRealityMeteringCluster(Cluster, CustomClusterMixin):

0 commit comments

Comments
 (0)