Power measurement negative

hello,

I have a small PV system hanging on a Shelly Pro4. This sends the power via MQTT to openhab3 - but negated. What is the best way to get the value back to positive in openhab3?

Send more Power to the Bauer ? :rofl:
There’s a gazillion options and which one is “best” depends on details of your system, your knowledge etc etc that noone knows about but you only (but you did not tell us).
I’d apply a JS transformation profile on item level.

thanks for the tip.
I am still very inexperienced in this field.

With Google I have at least managed the following.

Script invert.js
(function(i) {return i - i*2); } ) (i)

Log-File
2022-09-07 16:22:59.305 [WARN ] [iles.JavaScriptTransformationProfile] - Could not transform state ‘-512.2’ with function ‘invert.js’ and format ‘%s’

Attempts with state-format in the UI or parseFloat(i) in the script did not yield any successes

Got it!

it was in the wrong folder. instead of transform i had put it in scripts