Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[YAML] Add _ById commands support for darwin-framework-tool - Followu… #36063

Merged
merged 1 commit into from
Oct 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,13 @@ def run(self, specs, value, cluster_name: str, typename: str, array: bool):
del value[key_name]

elif isinstance(value, list) and array:
# Instead of using `False` for the last parameter (array), `isinstance(v, list)` is used.
# While the data model specification does not include lists of lists, the format returned
# by the Matter.framework for *ById APIs may contain them.
# For example, the command:
# darwin-framework-tool any read-by-id 29 0 0x12344321 65535
# returns value such as:
# [[{'DeviceType': 17, 'Revision': 1}, {'DeviceType': 22, 'Revision': 1}], ...]
value = [self.run(specs, v, cluster_name, typename, isinstance(v, list))
for v in value]

Expand Down
Loading