Skip to content

Commit 3c1a092

Browse files
committed
Fix attribute string
1 parent 76dfd17 commit 3c1a092

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/python_testing/matter_testing_support.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -413,8 +413,9 @@ def get_cluster_string(self, cluster_id: int) -> str:
413413
return f"Cluster {name} ({cluster_id}, 0x{cluster_id:04X})"
414414

415415
def get_attribute_string(self, cluster_id: int, attribute_id) -> str:
416-
if attribute_id in GlobalAttributeIds:
417-
return f"Attribute {GlobalAttributeIds(attribute_id).name} {attribute_id}, 0x{attribute_id:04X}"
416+
global_attrs = [item.value for item in GlobalAttributeIds]
417+
if attribute_id in global_attrs:
418+
return f"Attribute {GlobalAttributeIds(attribute_id).to_name()} {attribute_id}, 0x{attribute_id:04X}"
418419
mapping = self._mapping._CLUSTER_ID_DICT.get(cluster_id, None)
419420
if not mapping:
420421
return f"Attribute Unknown ({attribute_id}, 0x{attribute_id:08X})"

0 commit comments

Comments
 (0)