Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions matter_server/common/custom_clusters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
),
Expand Down Expand Up @@ -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."""
Expand Down Expand Up @@ -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."""
Expand Down
Loading