I want to start a dialog about internationalization and localization. Many of the device types currently in use are targeted towards American methods of measurement. Fahrenheit for temperatures for example.
This is the common setup for temperature in a thermostat
valueTile("temperature", "device.temperature", width: 2, height: 2) {
state("temperature", label:'${currentValue}°',
backgroundColors:[
[value: 31, color: "#153591"],
[value: 44, color: "#1e9cbb"],
[value: 59, color: "#90d2a7"],
[value: 74, color: "#44b621"],
[value: 84, color: "#f1d801"],
[value: 95, color: "#d04e00"],
[value: 96, color: "#bc2323"]
]
)
}
I am working on a device type that has a preference setting for Fahrenheit/Celsius, and it is fairly easy to change the actual temp reading to reflect that. The more difficult task is how do you change the background color for the tiles? 32 degrees Celsius is fairly warm, and well 96 degrees Celsius and you are having a pretty bad day. Throwing if statements into the tile markup seems inelegant. I am just wondering if there is a best practice for situations like this? Any thoughts? @Jim @Ben