I’m trying to create a custom capability with list displayType, however my capability is not shown in the App.
What am I missing? Any ideas would be greatly appreciated.
You’re missing the detailView.list.command attribute at the presentaiton. I recommend you to check the Presentations API the check the structure of the list display type.
Now I have another issue that once I change the list value I get the following error in the app:
“A network or server error occurred. Try again later”
and the value is not set.
@erickv
I have a set function, I just didn’t know it is mandatory. I tried to keep the example as small as possible, but obviously, I’m doing something wrong, so I will post a complete example. I’m sorry, it is pretty long.
The idea is to use this capability for virtual devices creator.
I plan to have a list of things to be created and a momentary button.
The user would first select a virtual device to create, then press momentary to actually create it.
It is not mandatory, as it is not required according to the documentation and it could be used as an informative drop-down. But, as its principal use-case depends on the ability to select available states/actions (and I think it is the case of your implementation), a capability schema command is necessary if you want to spread the event across the platform consistently.
In addition, you may need to add the setter attribute at your capability schema, to actually generate the attribute ↔ setter command association, i.e.:
...
additionalProperties: false
required:
- value
enumCommands: []
setter: setThingType
commands:
setThingType:
name: setThingType
arguments:
- name: value
...