diff --git a/src/controller/python/chip/clusters/ClusterObjects.py b/src/controller/python/chip/clusters/ClusterObjects.py index 1774ca8c083a4c..0aef317257014f 100644 --- a/src/controller/python/chip/clusters/ClusterObjects.py +++ b/src/controller/python/chip/clusters/ClusterObjects.py @@ -206,6 +206,7 @@ def FromTLV(cls, data: bytes): def descriptor(cls): raise NotImplementedError() + # The below dictionaries will be filled dynamically # and are used for quick lookup/mapping from cluster/attribute id to the correct class ALL_CLUSTERS = {} @@ -214,6 +215,7 @@ def descriptor(cls): ALL_ACCEPTED_COMMANDS = {} ALL_GENERATED_COMMANDS = {} + class ClusterCommand(ClusterObject): def __init_subclass__(cls, *args, **kwargs) -> None: """Register a subclass.""" @@ -231,6 +233,7 @@ def __init_subclass__(cls, *args, **kwargs) -> None: # handle case where the ClusterAttribute class is not (fully) subclassed # and accessing the id property throws a NotImplementedError. pass + @ChipUtility.classproperty def cluster_id(self) -> int: raise NotImplementedError() @@ -244,8 +247,6 @@ def must_use_timed_invoke(cls) -> bool: return False - - class Cluster(ClusterObject): ''' When send read requests with returnClusterObject=True, we will set the data_version property of the object. diff --git a/src/python_testing/matter_testing_support.py b/src/python_testing/matter_testing_support.py index 7d11496ede7701..65d28dd0821339 100644 --- a/src/python_testing/matter_testing_support.py +++ b/src/python_testing/matter_testing_support.py @@ -333,6 +333,7 @@ class CommandPathLocation: cluster_id: int command_id: int + @dataclass class ClusterPathLocation: endpoint_id: int