I want to display multiple series of items measuring electrical power in one chart. My problem is, that 3 items use unit “W” and one uses “kW”. Is it possible to tell a series that it should convert “kW” to “W” ? If so, how?
I don’t believe so. Charts just collect the persisted data and will not perform any math or conversions on it. The best you could do is add a second vertical axis to the chart so that the W items are using 1 y-axis and the kW item is using the other. If it’s important to you that the values line up then you will have to set absolute min and max values of those axes.
Yes, it’s important that the values line up, otherwise I could use different charts. And setting min and max of the axis is also not a solution because I loose the automatic scaling feature of the chart.
It seems that I have to resolve it using the way I did using OH3: Define a second item with the needed unit and let a rule do the conversion.
You don’t need a rule. Set the
unit metadata to
kW and as long as the updates posted to that Item carry units, the state of the Item will be converted to