Incompatibility of custom device Presentation (VID) and profile capability config: values range[ ]

Incompatibility of custom device Presentation (VID) and profile capability config: values range[ ]
Hi @AlejandroPadilla

When in a profile you use the range configuration of a capability it worked perfectly:

name: child-thermostat
components:
- id: main
   capabilities:
   - id: temperatureMeasurement
     Version 1
     config:
       values:
         - key: "temperature.value"
           range: [-50, 250]
.
.
.
.
metadata:
  deviceType: Thermostat	
  ocfDeviceType: oic.d.thermostat
  deviceTypeId: Thermostat

If you need to use this profile with a multiple mosaic and you create a custom VID so that the multiple mosaic is displayed in the App and the capabilities ranges are maintained, then the VID that was created and is in the profile is not assigned to the device and the multiple Tile is not displayed in App but the custom capability ranges are fine

Presentation.ID assigned in device my.smartthings.com, advanced users is the same to non VID presentation

name: child-thermostat-multi
components:
- id: main
   capabilities:
   - id: temperatureMeasurement
     Version 1
     config:
       values:
         - key: "temperature.value"
           range: [-50, 250]
.
.
.
.
metadata:
  deviceType: Thermostat	
  ocfDeviceType: oic.d.thermostat
  deviceTypeId: Thermostat
  mnmn: SmartThingsCommunity
  vid: 446450a9-1d7e-3d81-843d-98a9d39b330c

For the VID to be assigned, the ranges of the capabilities in the profile must be removed and placed in the VID.

Are these two methods for defining custom capabilities ranges incompatible?

The custom attribute value ranges are part of the presentation (vid).

My understanding is that by including the config sections in the profile you are effectively triggering the equivalent of:

  • Generating a default device-config file from the profile.
  • Editing the device config file with the changes you require.
  • Creating the presentation from the device config file.
  • Adding the presentation to the profile metadata.

So any presentation/vid you have already included in the metadata would be replaced.

I can imagine we might see the functionality of the embedded config develop over time so eventually the profile is all that is needed.

Let me check it wit the team :saluting_face:

1 Like

@Mariano_Colmenarejo the team shared this the device configuration are not merged, the implicit one takes precedence over the other. If you embed conf values in the device profile, it will ignore the vid and generate a new one. The device configuration for the original vid will not be changed, but the device will not use anything in it.

Thanks for response @AlejandroPadilla