Units of Measurement

Hi folks,

I’ve an item


Number:Length OpenWeatherMap_Fore3H_Rain                 "Rain volume [%.2f %unit%]"        (gWeather)                            { channel="openweathermap:onecall:api:local:forecastHours03#rain" }

the value reported is eg. 0,00113 m … I would like to see 1,13 mm/h, what is the best option to use the Units of Measurement?

thanks for helping me

Andrea

mm/h would be a measure of speed, not length. I just looked at the docs, and that’s actually the example given. :wink:

In some cases the system default unit may not be the most useful unit for a given quantity. For measuring precipitation km/h would be a quite uncommon unit, while mm/h would be the expected unit. You can set the unit metadata to a different unit to change the item’s unit:

Number:Speed "Rainfall" { unit="mm/h" }

I’m a bit confused, as the Binding is saying “ Expected rain volume”, but the API are talking about mm/h

:frowning:

Yeah, it’s a speed.
The point is, it’s m³/(m²*t) so m³/m² shortens to m.

Shall I convert m to mm?

Change Number:Length to Number:Speed in your item definition.

much better, I’ve seen I can simply put [%.2f mm] and that will do the trick :slight_smile:

Thank you @Udo_Hartmann

Andrea

Please be aware that it’s a speed (really), the water surface is rising by x Millimeters per hour.
If it’s about the amount of rain fallen in a certain amount of time, this is a length (i.e. the water surface has risen x Millimeters in 5 hours).

1 Like