Format a number without rules

Hi,
I have some item numbers where some wireless sensors give me back the battery voltage in millivolt.
So i got 3100 for 3,1 volt.
Is there a way to format the voltage directly into the item without using a rule, using a trasformation?

Thanks

Marco

Maybe. I think it depends if the binding in question supports transforms, many do but some don’t.

here’s an example which reduces returned value by 3:

item
Number Temperature_1249 “Kitchen 12/49 [%.1f °C]” (House,Kitchen,All_Temperature,Node12,log) {mqtt="<[OH2MQTT:home/rfm_gw/nb/node12/dev49:state:JS(minus3.js)]"}

Transform
minus3.js contains

(function(i){ return i -3.0; })(input)