Cut string/number from Item

Hello,

I have a few simple RFXCOM weather/temperature sensors. They generally work, and in the Paper UI everything seems perfect. As soon as I add the sensor to a sitemap I see the “real” value, which sometimes is not 22.5°C but a very very long number with at least 15 digits, probably many more. This might be a binding error, a rounding error or whatnot.

my sitemap:

Text item=temp_terasse label="Terasse: [%s °C]"

The question is is there any possibillity to cut %s to only 3 digits?

thanks
Daniel

If the item temp_terasse is a Number item, you can format it properly using %.2f (two digits of decimal precision) instead of %s.

1 Like

that was it, thank you!

1 Like