I’m making an edge driver with a custom presentation created.
The capability and presentation are as follows.
{
"name": "test",
"ephemeral": false,
"attributes": {
"action": {
"schema": {
"type": "object",
"properties": {
"value": {
"title": "Command",
"type": "string",
"enum": [
"on",
"off"
]
}
},
"additionalProperties": false,
"required": [
"value"
]
},
"setter": "setAction",
"enumCommands": [
]
}
},
"commands": {
"setAction": {
"name": "setAction",
"arguments": [
{
"name": "mode",
"optional": false,
"schema": {
"title": "Command",
"type": "string",
"enum": [
"on",
"off"
]
}
}
]
}
}
}
{
"dashboard": {
"states": [],
"actions": [],
"basicPlus": []
},
"detailView": [
{
"label": "Command",
"displayType": "list",
"list": {
"command": {
"name": "setAction",
"alternatives": [
{
"key": "on",
"value": "on",
"type": "active"
},
{
"key": "off",
"value": "off",
"type": "active"
}
]
},
"state": {
"value": "action.value",
"alternatives": [
{
"key": "on",
"value": "on",
"type": "active"
},
{
"key": "off",
"value": "off",
"type": "active"
}
]
}
},
"state": null
}
],
"automation": {
"conditions": [
],
"actions": [
{
"label": "Command",
"displayType": "list",
"list": {
"alternatives": [
{
"key": "on",
"value": "on",
"type": "active"
},
{
"key": "off",
"value": "off",
"type": "active"
}
],
"command": "setAction"
}
}
]
},
"id": "mynamespace.capability",
"version": 1
}
And in the edge driver, I specified the command handler as follows
[caps['mynamespace'].ID] = {
[caps['mynamespace.capability'].commands.setAction.NAME] = commands.action,
}
The handler function runs fine. But
After selecting a list in DetailView, screen processing does not complete and an error message is displayed during loading
I tried to change the attribute of capability, but the following warning message is displayed
device:emit_event(caps['mynamespace.capability'].action('on'))
Attempted to generate event for f20779c7-1bf7-48c4-8adc-2f1c3e41a3db.main but it does not support capability test
What should I do? help me please