Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add additional attribute to Inovelli VTM31-SN dimmer custom cluster #1103

Merged
Merged
Show file tree
Hide file tree
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
6 changes: 6 additions & 0 deletions dashboard/src/client/models/descriptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12235,6 +12235,12 @@ export const clusters: Record<number, ClusterDescription> = {
"cluster_id": 305134641,
"label": "LEDIndicatorIntensityOff",
"type": "uint"
},
"305070342": {
"id": 305070342,
"cluster_id": 305134641,
"label": "ClearNotificationWithConfigDoubleTap",
"type": "bool"
}
}
},
Expand Down
29 changes: 29 additions & 0 deletions matter_server/common/custom_clusters.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,17 @@ def descriptor(cls) -> ClusterObjectDescriptor:
ClusterObjectFieldDescriptor(
Label="ledIndicatorIntensityOff", Tag=0x122F0062, Type=uint
),
ClusterObjectFieldDescriptor(
Label="clearNotificationWithConfigDoubleTap",
Tag=0x122F0106,
Type=bool,
),
]
)

ledIndicatorIntenstyOn: uint | None = None
ledIndicatorIntensityOff: uint | None = None
clearNotificationWithConfigDoubleTap: bool | None = None

class Attributes:
"""Attributes for the Inovelli Cluster."""
Expand Down Expand Up @@ -440,6 +446,29 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor:

value: uint = 0

@dataclass
class ClearNotificationWithConfigDoubleTap(
ClusterAttributeDescriptor, CustomClusterAttributeMixin
):
"""ClearNotificationWithConfigDoubleTap Attribute within the Inovelli Cluster."""

@ChipUtility.classproperty
def cluster_id(cls) -> int:
"""Return cluster id."""
return 0x122FFC31

@ChipUtility.classproperty
def attribute_id(cls) -> int:
"""Return attribute id."""
return 0x122F0106

@ChipUtility.classproperty
def attribute_type(cls) -> ClusterObjectFieldDescriptor:
"""Return attribute type."""
return ClusterObjectFieldDescriptor(Type=bool)

value: bool = False


@dataclass
class NeoCluster(Cluster, CustomClusterMixin):
Expand Down