Skip to content

Commit 606cfee

Browse files
authored
ObstructionDetected Attribute within the Eve Cluster (#1196)
1 parent 8b1cf26 commit 606cfee

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

matter_server/common/custom_clusters.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@ def descriptor(cls) -> ClusterObjectDescriptor:
114114
ClusterObjectFieldDescriptor(
115115
Label="current", Tag=0x130A0009, Type=float32
116116
),
117+
ClusterObjectFieldDescriptor(
118+
Label="obstructionDetected", Tag=0x130A0010, Type=bool
119+
),
117120
ClusterObjectFieldDescriptor(
118121
Label="altitude", Tag=0x130A0013, Type=float32
119122
),
@@ -143,6 +146,7 @@ def descriptor(cls) -> ClusterObjectDescriptor:
143146
weatherTrend: int | None = None
144147
valvePosition: int | None = None
145148
motionSensitivity: int | None = None
149+
obstructionDetected: bool | None = None
146150

147151
class Attributes:
148152
"""Attributes for the Eve Cluster."""
@@ -285,6 +289,29 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
285289

286290
value: float32 = 0
287291

292+
@dataclass
293+
class ObstructionDetected(
294+
ClusterAttributeDescriptor, CustomClusterAttributeMixin
295+
):
296+
"""ObstructionDetected Attribute within the Eve Cluster."""
297+
298+
@ChipUtility.classproperty
299+
def cluster_id(cls) -> int:
300+
"""Return cluster id."""
301+
return 0x130AFC01
302+
303+
@ChipUtility.classproperty
304+
def attribute_id(cls) -> int:
305+
"""Return attribute id."""
306+
return 0x130A0010
307+
308+
@ChipUtility.classproperty
309+
def attribute_type(cls) -> ClusterObjectFieldDescriptor:
310+
"""Return attribute type."""
311+
return ClusterObjectFieldDescriptor(Type=bool)
312+
313+
value: bool = False
314+
288315
@dataclass
289316
class Altitude(ClusterAttributeDescriptor, CustomClusterAttributeMixin):
290317
"""Altitude Attribute within the Eve Cluster."""

0 commit comments

Comments
 (0)