Here is the capability presentation for Temperature Measurement:
smartthing capabilities:presentation temperatureMeasurement -j
{
"dashboard": {
"states": [
{
"label": "{{temperature.value}} {{temperature.unit}}",
"alternatives": [
{
"key": "C",
"value": "°C",
"type": "active"
},
{
"key": "K",
"value": "°K",
"type": "active"
},
{
"key": "F",
"value": "°F",
"type": "active"
}
]
}
],
"actions": [],
"basicPlus": []
},
"detailView": [
{
"label": "___PO_CODE_SMARTTHINGS_DREAM_SAC_TMBODY_TEMPERATURE",
"displayType": "slider",
"slider": {
"range": [
-20,
50
],
"unit": "temperature.unit",
"value": "temperature.value",
"valueType": "number"
}
}
],
"automation": {
"conditions": [
{
"label": "___PO_CODE_SMARTTHINGS_DREAM_SAC_TMBODY_TEMPERATURE",
"displayType": "numberField",
"numberField": {
"value": "temperature.value",
"valueType": "number",
"unit": "temperature.unit",
"range": [
-20,
50
]
}
}
],
"actions": []
},
"id": "temperatureMeasurement",
"version": 1
}
It specifies the device type slider
for the details view. Now here is what you get if you use it in a handler that also has the Relative Humidity Sensor:
I see nothing in the presentation about displaying temperature in the humidity in the same widget, or indeed having a link to a graph. Not saying it doesn’t look OK but I didn’t specify it.
Similarly a Switch has a label in its capability presentation but none in the UI, and uses a different type of button, and you can do it with other capabilities.
I see a couple of possibilities:
- The device plugin (the bit of the app that actually does the rendering into HTML) is just ignoring the capability presentations and doing its own thing with whatever it finds.
- The concept of capability presentations is relatively recent and is currently only applied to custom capabilities, with the stock capabilities being handled differently.
Either the only way to predict what you will end up is a combination of the API where it is working for custom capabilities, and guesses based on previous experience for stock capabilities.