diff --git a/src/controller/python/chip/clusters/ClusterObjects.py b/src/controller/python/chip/clusters/ClusterObjects.py index c6316e07cb19c6..c0a0adec1ccacb 100644 --- a/src/controller/python/chip/clusters/ClusterObjects.py +++ b/src/controller/python/chip/clusters/ClusterObjects.py @@ -374,8 +374,8 @@ def __init_subclass__(cls, *args, **kwargs) -> None: """Register a subclass.""" super().__init_subclass__(*args, **kwargs) try: - if cls.event_id not in ALL_EVENTS: - ALL_EVENTS[cls.event_id] = {} + if cls.cluster_id not in ALL_EVENTS: + ALL_EVENTS[cls.cluster_id] = {} # register this clusterattribute in the ALL_ATTRIBUTES dict for quick lookups ALL_EVENTS[cls.cluster_id][cls.event_id] = cls except NotImplementedError: