Skip to content

Commit

Permalink
[chip-tool] Translate all ById command properly even when the cluster…
Browse files Browse the repository at this point in the history
… is not Any (#27251)
  • Loading branch information
vivien-apple authored and pull[bot] committed Oct 24, 2023
1 parent 19f4686 commit 3734083
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@


_ALIASES = {
'AnyCommands': {
'alias': 'any',
'*': {
'commands': {
'CommandById': {
'alias': 'command-by-id',
Expand Down Expand Up @@ -98,6 +97,9 @@
},
}
},
'AnyCommands': {
'alias': 'any',
},
'CommissionerCommands': {
'alias': 'pairing',
'commands': {
Expand Down Expand Up @@ -313,7 +315,7 @@ def __get_argument_name(self, request, entry):
else:
argument_name = 'value'

return self.__get_alias(cluster_name, command_name, argument_name) or argument_name
return self.__get_alias('*', command_name, argument_name) or self.__get_alias(cluster_name, command_name, argument_name) or argument_name

def __maybe_add(self, rv, value, name):
if value is None:
Expand Down

0 comments on commit 3734083

Please sign in to comment.