Another bug @erickv @nayelyz with changes to presentations not being reflected.
- Create a capability, presentation (with a custom “state” component in the detailView) and then device-config:create
- The platform will generate a VID (which I understand is a unique hash of the components in the configuration)
- Delete the custom capability
- Change the presentation custom component in detailView from “state” to “list”
- Regenerate the capability, presentation and configuration (don’t make any changes to the capability or configuration, the only change is to the custom control from “state” to “list” in the presentation above)
- The UI still renders the custom components as a “state” instead of a “list”
The bug is replicable consistently and the UI refuses to either generate a new VID or update the presentation for that VID.
Here’s is a custom VID I created that originally had a “state” as the custom control in the detailView. Then I deleted the capability and created it all again ONLY changing the presentation control from “state” to “list”, however the presentation:device-config:create command still returns the same VID and it still renders the component as “state” and not a “list”: 7c7c3ec0-db88-3fc2-b498-d4135a2a22dd
In this VID the custom control detailView in the presentation is defined as:
“detailView”: [
{
“label”: “Arm Mode”,
“displayType”: “list”,
“list”: {
…
Where as when I query the VID it returns:
{
“capability”: “xxx”,
“version”: 1,
“label”: “Arm Mode”,
“displayType”: “state”,
Notice it’s not taking the updated presentation for the control (I’ve deleted the capability and started over so it should pick up the latest presentation JSON).
If I change the configuration JSON (even a minor change not related to the custom component, e.g. change the dashboard control to something else) then presentation:device-config:create will generate a new VID and it renders the custom component correctly (as a “list” now since it was changed from “state” to “list” in the presentation JSON). It looks like once the VID is generated it doesn’t seem to want to update the presentation layout (displayType) for that VID.
Is there a way to force the platform to update the VID when the presentation changes? Let me know if you need more details.
EDIT: I tried it again by changing the presentation for the custom control from “state” to “stepper” and it still generates the same VID and renders it as a “state” (unless I make some other un-related change the configuration JSON which forces it to generate a new VID and then display the control correctly as a stepper)