Hi, @liuyd96
I did some tests and saw the same behavior you mentioned with the empty command, so, I’ll ask the engineering team about the error.
However, another solution is defining an argument for the command but setting the argument property as "optional": true. This way, the presentation can have the property “name” in “command” and:
When you send commands through the API, it won’t need to include an argument
The app will include the value in “key” of the alternatives as the argument for the command automatically. For example:
Hi, @liuyd96
Following up, the engineering team provided more details about the “list” display type.
This is the sum up:
There are two types of commands can be defined for a capability:
a. Command with arguments
b. enumCommands (the capability “Switch” is an example of their definition)
When we use command.name a command with arguments is expected
a. The command called is the one specified in name and its argument is the selected option of the alternatives, specifically, the value in “key”.
If we remove the property name from command, an enumCommand is expected and it can omit the argument.
a. In this case, the command name will be looked up in the “key” property of “alternatives”
We’ll create a ticket to add this information to the developer documentation to avoid confusion in the future.