Skip to content

Commit 1d20696

Browse files
authored
MotionSensitivity attribute within the Eve Cluster (#887)
1 parent bd2ddf3 commit 1d20696

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

matter_server/common/custom_clusters.py

+29
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ def descriptor(cls) -> ClusterObjectDescriptor:
9393
ClusterObjectFieldDescriptor(
9494
Label="valvePosition", Tag=0x130A0018, Type=int
9595
),
96+
ClusterObjectFieldDescriptor(
97+
Label="motionSensitivity", Tag=0x130A000D, Type=int
98+
),
9699
]
97100
)
98101

@@ -105,6 +108,7 @@ def descriptor(cls) -> ClusterObjectDescriptor:
105108
altitude: float32 | None = None
106109
pressure: float32 | None = None
107110
valvePosition: int | None = None
111+
motionSensitivity: int | None = None
108112

109113
class Attributes:
110114
"""Attributes for the Eve Cluster."""
@@ -314,6 +318,31 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
314318

315319
value: int = 0
316320

321+
@dataclass
322+
class MotionSensitivity(
323+
ClusterAttributeDescriptor, CustomClusterAttributeMixin
324+
):
325+
"""MotionSensitivity Attribute within the Eve Cluster."""
326+
327+
should_poll = False
328+
329+
@ChipUtility.classproperty
330+
def cluster_id(cls) -> int:
331+
"""Return cluster id."""
332+
return 0x130AFC01
333+
334+
@ChipUtility.classproperty
335+
def attribute_id(cls) -> int:
336+
"""Return attribute id."""
337+
return 0x130A000D
338+
339+
@ChipUtility.classproperty
340+
def attribute_type(cls) -> ClusterObjectFieldDescriptor:
341+
"""Return attribute type."""
342+
return ClusterObjectFieldDescriptor(Type=int)
343+
344+
value: int = 0
345+
317346

318347
@dataclass
319348
class NeoCluster(Cluster, CustomClusterMixin):

0 commit comments

Comments
 (0)