eclipse-archived / smarthome

Eclipse SmartHome™ project
https://www.eclipse.org/smarthome/
Eclipse Public License 2.0
862 stars 787 forks source link

[UOM] Avg group function with Dimensionless Items have unit 'one' #6843

Closed 5iver closed 5 years ago

5iver commented 5 years ago

I have groups of OpenWeatherMap Humidity and Cloudiness Items built with...

add_item("Forecast_Cloudiness_{:02d}".format(3 * index), item_type="Number:Dimensionless", label="Forecast ({:02d}): Cloudiness [%d %unit%]".format(3 * index), category="Sun_Clouds", tags=["OpenWeatherMap"])

The groups are built with...

add_item("gForecast_Cloudiness_" + str(index), item_type="Group", groups=["gForecast_" + str(index)], label=dayOfWeek + ": Cloudiness [%d %unit%]", category="Sun_Clouds", gi_base_type="Number:Dimensionless", group_function=ArithmeticGroupFunction.Max(), tags=["OpenWeatherMap"])

The Items display properly... image ... but the groups have unit 'one'... image

clinique commented 5 years ago

I've written a unit test for this, it seems to be working as expected.

maggu2810 commented 5 years ago

See openhab/openhab-core#588