OH4 scaled charting

Hello,

Is it possible to get the charting of an item scaled?
I have got an item with the value of our water meter in m3 but I would like to chart it in liter.
I could add an addition item and a rule which does the calculation but then I would lose the already existing historic data.
I am persisting with RRD4J and manipulation the historic data in the file would be hell.
Or is it possible to calculate the historic data for the new item which contains the value of the matermeter in liter once by a script?
I am running OH 4.0.4 in a debian VM.

Best regards
Christian Nordheider

For charts, what is in the db is what you get. So you’d either need to change the unit and correct all the values in the database, or start fresh with a new database and lose all the historic data.

There is no way for OH do do this on the fly. The unit is not stored in the database so there’s be no way for OH to know where to apply the scale or not even if it did.

But at least you don’t need a rule. If you create a new item or delete the database, all you need to do is change the unit metadata to l and the conversation will happen automatically.