I emailed this question to support and they replied that I should post it to the community.
Wish I could get an answer from the horses mouth so I knew it was right. They do still have the original code for this thing don’t they ?
Anyway here goes…
Since the api for valueTile is not in the developer documentation I am
hacking away trying to figure it out.
Is his tile documented ?
Specifically I am trying to get two dynamic values in this tile.
I see that the Aeon MultiSensor uses two variable values in a valueTile
currentValue and unit and it works fine.
valueTile(“illuminance”, “device.illuminance”, inactiveLabel: false) {
state “luminosity”, label:’${currentValue} ${unit}’, unit:“lux”
}
In this case “Unit” is not really variable because it never changes. So
I don’t know if it is “Dynamic”
I am trying to make a valueTile with two dynamic values but nothing I
try works. It crashes the app as soon as I add a second value.
Here is what I tried
valueTile(“temperatureName”, “device.temperatureName”, inactiveLabel:
false) {
state “temperatureName”, label:’${currentValue}
${shortName}’, unit:"", shortName=""
}
Is it possible to have more than one dynamic value in a valueTile ?
Is value tile hard coded to only allow currentValue and unit ?
map.value = convertTemperatureIfNeeded(cmd.scaledSensorValue, cmdScale)
map.unit = getTemperatureScale()
map.shortName = “test”
Another solution is to change map.value to be the full string
map.value = convertTemperatureIfNeeded(cmd.scaledSensorValue, cmdScale)
- " " + shortName;
But this causes the tile to fail to display. It just displays “–”
I found that if I add decoration: “flat” to the tile it works but it’s
ugly. Since I lose any ability to set colors, icons etc.
Second Question: With valueTile I find that if icon is set, it no
longer displays label. Is this a default behavior with an option to
display the value as well as the icon or is it hard coded to only
display label if icon is not set ?
standardTile allows both icon and label to be set. I don’t understand
why valueTile would be different.