UoM in group: change unit

First my items.

Group:Number:Speed:AVG	Rainintensity							"Regenintensiteit [%.2f mm/h]"									(Weather)
Number:Speed 			Buienradar_Current				"Regenintensiteit [%.2f mm/h]"		(Rainintensity, RestoreOnStartup)					 {channel="buienradar:rain_forecast:buienradar:forecast_0"}
Number:Speed			Buienradar_Forecast5			"Regenintensiteit (over 5min) [%.2f mm/h]"		(Rainintensity)		{channel="buienradar:rain_forecast:buienradar:forecast_5"}
Number:Speed			Buienradar_Forecast10			"Regenintensiteit (over 10min) [%.2f mm/h]"		(Rainintensity)		

In the sitemap the group and all the items show the value in mm/h.

But when I use the rules or use smarthome:status in the console, the items are still mm/h but the group is km/h

openhab> smarthome:status Buienradar_Current
0.1 mm/h
openhab> smarthome:status Rainintensity
5.999995200003839666666666666666668E-8 km/h

How do I change the unit in the group (for the stored value)?

Why would you need to do that? It doesn’t matter in rules, you can specify the wanted units e.g. for some comparison.
I can think of a good reason - say you wanted to persist for charting purposes.

There isn’t a direct way to do what you want.
It can’t really follow member Item units, they might all be different.
I think it could be a sensible enhancement if Group aggregation functions for a QuantityType Group looked at [state presentation] for a default unit, the way that bindings can.
The fallback would be system default, which is I guess what you get now.

That’s true. Never thought of that. Mostly I use a “dirty” hack and strip of the UoM -> Item.state as QuantityType<Number>).intValue
With my hack I get the wrong number (obviously).

Thank for your reaction.

Right. So a unit based comparison would be
if (myGroup.state > 1.5 | mm/h)

I think I’ll have a little play and may make an enhancement request anyway.