openhab-core: Group SUM aggregation does not inherit the member's UoM
A Group containing members with a UoM setting that differs from the ‘default’ will not use the members’ UoM setting in the SUM aggregation. This probably also applies to the AVG aggregation since it also generates a new value (as opposed to returning a matching Item’s state when aggregating with MIN or MAX).
An example is provided below:
The Buienradar binding exposes rain intensity forecasts as Number:Speed
expressed in mm/h. This is also ‘inherited’ by the Item
s linked to these binding channels: the relating Item
s are of subtype Number:Speed
and the state is expressed in mm/h.
When I create a Group
and assign all rain intensity Item
s from the Buienradar binding, and when I set the SUM
aggregation, the Group uses a different UoM than the individual members, even if I set the member’s subtype to ‘Number:Speed`. The Group reports a state in km/h (1 million bigger unit than the individual members’ unit)
Where an Item
can be configured to have an explicit UoM for the quantity represented in the state, this is apparently not possible with a Group
.
For Main UI widgets you can of course use the displayState
property which behaves similarly to what the label="..."
construct allows in sitemaps.
See also the following discussion: https://community.openhab.org/t/oh3-group-item-number-speed-defaults-to-km-h-how-to-set-item-uom-e-g-to-mm-h/125087
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15 (3 by maintainers)
Re-reading issue and where it occurs I agree I am wrong in this regard. My understanding of issue was wrong. Suggestion I gave above would help if one item is Decimal and other is Quantity.
Profile can and will modify item state which is linked to channel. That’s all they do. Given that groups with functions listen to state changes of their own members they do not involve profiles. Sorry for mess!