diff --git a/matter_server/common/custom_clusters.py b/matter_server/common/custom_clusters.py index 80ec53bb..47431e7a 100644 --- a/matter_server/common/custom_clusters.py +++ b/matter_server/common/custom_clusters.py @@ -114,6 +114,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor( Label="current", Tag=0x130A0009, Type=float32 ), + ClusterObjectFieldDescriptor( + Label="obstructionDetected", Tag=0x130A0010, Type=bool + ), ClusterObjectFieldDescriptor( Label="altitude", Tag=0x130A0013, Type=float32 ), @@ -143,6 +146,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: weatherTrend: int | None = None valvePosition: int | None = None motionSensitivity: int | None = None + obstructionDetected: bool | None = None class Attributes: """Attributes for the Eve Cluster.""" @@ -285,6 +289,29 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: float32 = 0 + @dataclass + class ObstructionDetected( + ClusterAttributeDescriptor, CustomClusterAttributeMixin + ): + """ObstructionDetected Attribute within the Eve Cluster.""" + + @ChipUtility.classproperty + def cluster_id(cls) -> int: + """Return cluster id.""" + return 0x130AFC01 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + """Return attribute id.""" + return 0x130A0010 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + """Return attribute type.""" + return ClusterObjectFieldDescriptor(Type=bool) + + value: bool = False + @dataclass class Altitude(ClusterAttributeDescriptor, CustomClusterAttributeMixin): """Altitude Attribute within the Eve Cluster."""