I’m struggling with charts / analyzer disregarding the metric prefixes from the UoM configuration for the Item:
Number:Power TotalPower "Total power [%.2f kW]"
Even no luck when I manually set up a chart page and name the Y-axis “kW” in a hope that it will recognize the metrix prefix just like the UoM configuration for the Item:
series:
- component: oh-time-series
config:
gridIndex: 0
item: TotalPower
name: Total power
type: line
xAxisIndex: 0
yAxisIndex: 0
yAxis:
- component: oh-value-axis
config:
gridIndex: 0
name: kW
xAxis:
- component: oh-time-axis
config:
gridIndex: 0
This causes mainly two challenges:
- For typical power values in the tens of thousands watts, the Y-axis numbers takes up too much space and reduces readability
- Showing related Number:Energy items with its default units of “kWh” on the same Y-axis as Number:Power with its default units of “W” ends up with a factor of 1000 scaling error between them
For the second point one can question why Power defaults to “W” while Energy defaults to “kWh”, but I still appreciate that Energy at least does not defaults to “J”
My understanding is that this simply is how it’s implemented and not really a bug. But I surely wish the implementation would consider UoM (or at least metric prefixes) also in charts. Tho this would probably need some consideration to not break the possibility to show Power and Energy on the same Y-axis
openHAB version 4.1.2