Skip to content

Commit 76dfd17

Browse files
committed
Fix global attribute names
1 parent 50f040c commit 76dfd17

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/python_testing/matter_testing_support.py

+3
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
from chip.setup_payload import SetupPayload
6161
from chip.storage import PersistentStorage
6262
from chip.tracing import TracingContext
63+
from global_attribute_ids import GlobalAttributeIds
6364
from mobly import asserts, base_test, signals, utils
6465
from mobly.config_parser import ENV_MOBLY_LOGPATH, TestRunConfig
6566
from mobly.test_runner import TestRunner
@@ -412,6 +413,8 @@ def get_cluster_string(self, cluster_id: int) -> str:
412413
return f"Cluster {name} ({cluster_id}, 0x{cluster_id:04X})"
413414

414415
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}"
415418
mapping = self._mapping._CLUSTER_ID_DICT.get(cluster_id, None)
416419
if not mapping:
417420
return f"Attribute Unknown ({attribute_id}, 0x{attribute_id:08X})"

0 commit comments

Comments
 (0)