I would like to present information standardly, independent of the device/brand.
The image is a small example of the temperature display. Some show no decimal place, others with one, two, and even a thermostat that shows four places.
The same happens with the temperature symbol. It does not appear, or only the "c" appears, others the degree and c "⁰c".
Similar situation with humidity, some have no information at all, others show the "%" symbol, others "%rs".
Is there any way to create a standard presentation?
G'day Wilson, it feels like this should be possible, let me see what I find.... Not in the next 9-10 hours But I'm sure there is something we can come up with, including others here in the Community....
Yes, that is true. It may require a driver, or, ideally some "words" with the developer of drivers who have developed drivers that do not honour the scale used on the hub.
I thought there might be something in the templates, like number formatting. The same way you format colors, icons, maybe something like number formatting. Well you are the experts.
Could a virtual device be used where the decimal place can be adjusted. I sware I've seen that option on a temp/humidity sensor driver before. I think it may have been the guy that wrote all those Sonoff drivers but got banned or something. It's still in HPM.
Hopefully Google returned the same trusted source we all rely upon...
TBH - Makes sense to need another device, the more I think about it... would be nice to find a CSS / Javascript option, but expect it will be a virtual device...
"NUMBER" whatever that means. Could be Integer, could be Float, could be Double, default Groovy is BigDecimal. For the Honeywell Thermostat I use, the driver uses the default of BigDecimal and I note that it gets displayed as "74.000" on my Device Info page.
When that gets displayed on a dashboard, it depends on which tile. An Attribute only tile displays the full value, while a Thermostat tile displays both a single decimal in the center and the full value at the top:
Modifying the driver to round to two decimal places results in:
And then displayed as:
I don't believe 4 decimal places has any worthwhile value in a display, and I've added the round down to my development code.
I tested and worked on the whole discussion of creating virtual devices/variables to make a bridge conversation, but I think a bad way. In my case, I have 18 sensors; I would have to add devices or variables and then build rules that make no sense to me this pollution.
The last comment about changing the drive seems like a good way to go, but I think that only drives are added to the codes; how to do it with HE native driver? Where would the change be made? Another detail is, would it be possible to determine the symbol, for example, "⁰c" or "⁰f"?
@sburke781 and other CSS magic, I keep thinking that there should be a way to identify the info in the html and then convert the information to the tile.
Taking this opportunity to thank to @csteele the developer of the Honeywell drive, who I think saw this discussion and have now posted a version getting the decimals right info, THANK YOU!
steele: v1.3.23 preset supportedThermostatFanModes & supportedThermostatModes used by Thermostat Controller app.