Skip to content

Commit 3295c8b

Browse files
authored
Add a custom cluster for Inovelli VTM31-SN Dimmer (#1090)
1 parent 568cc4d commit 3295c8b

File tree

2 files changed

+91
-0
lines changed

2 files changed

+91
-0
lines changed

dashboard/src/client/models/descriptions.ts

+18
Original file line numberDiff line numberDiff line change
@@ -12220,6 +12220,24 @@ export const clusters: Record<number, ClusterDescription> = {
1222012220
}
1222112221
}
1222212222
},
12223+
"305134641": {
12224+
"id": 305134641,
12225+
"label": "InovelliCluster",
12226+
"attributes": {
12227+
"305070177": {
12228+
"id": 305070177,
12229+
"cluster_id": 305134641,
12230+
"label": "LEDIndicatorIntensityOn",
12231+
"type": "uint"
12232+
},
12233+
"305070178": {
12234+
"id": 305070178,
12235+
"cluster_id": 305134641,
12236+
"label": "LEDIndicatorIntensityOff",
12237+
"type": "uint"
12238+
}
12239+
}
12240+
},
1222312241
"308149265": {
1222412242
"id": 308149265,
1222512243
"label": "NeoCluster",

matter_server/common/custom_clusters.py

+73
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,79 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
368368
value: int = 0
369369

370370

371+
@dataclass
372+
class InovelliCluster(Cluster, CustomClusterMixin):
373+
"""Custom (vendor-specific) cluster for Inovelli - Vendor ID 4961 (0x1361)."""
374+
375+
id: ClassVar[int] = 0x122FFC31
376+
377+
@ChipUtility.classproperty
378+
def descriptor(cls) -> ClusterObjectDescriptor:
379+
"""Return descriptor for this cluster."""
380+
return ClusterObjectDescriptor(
381+
Fields=[
382+
ClusterObjectFieldDescriptor(
383+
Label="ledIndicatorIntensityOn", Tag=0x122F0061, Type=uint
384+
),
385+
ClusterObjectFieldDescriptor(
386+
Label="ledIndicatorIntensityOff", Tag=0x122F0062, Type=uint
387+
),
388+
]
389+
)
390+
391+
ledIndicatorIntenstyOn: uint | None = None
392+
ledIndicatorIntensityOff: uint | None = None
393+
394+
class Attributes:
395+
"""Attributes for the Inovelli Cluster."""
396+
397+
@dataclass
398+
class LEDIndicatorIntensityOn(
399+
ClusterAttributeDescriptor, CustomClusterAttributeMixin
400+
):
401+
"""LEDIndicatorIntensityOn Attribute within the Inovelli Cluster."""
402+
403+
@ChipUtility.classproperty
404+
def cluster_id(cls) -> int:
405+
"""Return cluster id."""
406+
return 0x122FFC31
407+
408+
@ChipUtility.classproperty
409+
def attribute_id(cls) -> int:
410+
"""Return attribute id."""
411+
return 0x122F0061
412+
413+
@ChipUtility.classproperty
414+
def attribute_type(cls) -> ClusterObjectFieldDescriptor:
415+
"""Return attribute type."""
416+
return ClusterObjectFieldDescriptor(Type=uint)
417+
418+
value: uint = 0
419+
420+
@dataclass
421+
class LEDIndicatorIntensityOff(
422+
ClusterAttributeDescriptor, CustomClusterAttributeMixin
423+
):
424+
"""LEDIndicatorIntensityOff Attribute within the Inovelli Cluster."""
425+
426+
@ChipUtility.classproperty
427+
def cluster_id(cls) -> int:
428+
"""Return cluster id."""
429+
return 0x122FFC31
430+
431+
@ChipUtility.classproperty
432+
def attribute_id(cls) -> int:
433+
"""Return attribute id."""
434+
return 0x122F0062
435+
436+
@ChipUtility.classproperty
437+
def attribute_type(cls) -> ClusterObjectFieldDescriptor:
438+
"""Return attribute type."""
439+
return ClusterObjectFieldDescriptor(Type=uint)
440+
441+
value: uint = 0
442+
443+
371444
@dataclass
372445
class NeoCluster(Cluster, CustomClusterMixin):
373446
"""Custom (vendor-specific) cluster for Neo - Vendor ID 4991 (0x137F)."""

0 commit comments

Comments
 (0)