The possibility to use units of measure on items with automatic conversion is great - at least when presenting data on a sitemap. I have the following configuration and it is formatted on the sitemap as I expect.
/* Item */
Number:Speed Precipitation_d2 "Precipitaion [%.1f mm/h]"
/* Sitemap *
Text item=Precipitation_d2
The problem is that the following widget code (1) provides the result below, and (2) doesn’t work - I assume because it is a string. Am I doing something wrong or what do I have to do to format the number value as I want?
<!-- (1) -->
<div class="name green">{{itemValue('Precipitation_d2')}}</div>
<!-- (2) -->
<div class="name green">{{itemValue('Precipitation_d2') | number:1}}</div>