Skip to content

Commit f413045

Browse files
committed
[chip-tool] Translate all ById command properly even when the cluster is not Any
1 parent 8d2516a commit f413045

File tree

1 file changed

+5
-3
lines changed
  • examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter

1 file changed

+5
-3
lines changed

examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/encoder.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@
3434

3535

3636
_ALIASES = {
37-
'AnyCommands': {
38-
'alias': 'any',
37+
'*': {
3938
'commands': {
4039
'CommandById': {
4140
'alias': 'command-by-id',
@@ -98,6 +97,9 @@
9897
},
9998
}
10099
},
100+
'AnyCommands': {
101+
'alias': 'any',
102+
},
101103
'CommissionerCommands': {
102104
'alias': 'pairing',
103105
'commands': {
@@ -313,7 +315,7 @@ def __get_argument_name(self, request, entry):
313315
else:
314316
argument_name = 'value'
315317

316-
return self.__get_alias(cluster_name, command_name, argument_name) or argument_name
318+
return self.__get_alias('*', command_name, argument_name) or self.__get_alias(cluster_name, command_name, argument_name) or argument_name
317319

318320
def __maybe_add(self, rv, value, name):
319321
if value is None:

0 commit comments

Comments
 (0)