Okay, finally got it how the inline script transformations work.
The key gotcha here is that the syntax used in the official documentation has JS() wrapper but at least on openHAB 4.3.0.M2 the correct syntax is
| parseFloat(input)*100
Here’s the complete steps that I ended up doing.
-
Create the Item without any Unit of Measure
-
Once the Item has been created, apply an inline transformation to convert the value from EUR/kWh to c/kWH and multiply with VAT multiplier (VAT in Finland is 25.5%). So the complete inline transformation script is
| parseFloat(input)*100*1.255
- In the visualization chart, I define that the label of the Y-axis is c/kWh
Hope this helps somebody, I banged my head against the wall sufficiently with this… ![]()


