Hi there fellow Openhabians
I’m seeing trouble with my modbus queried solar inverter and its generation value. I want to act on the current generated power, hence I tried as a ECMA script:
var Prod = items["Strom_Erzeugung"];
However, the item Strom_Erzeugung contains f.e, “8.6E+2 W” which, when used in a simple “if (Prod > 300)” does not work. Other items don’t exhibit this behavior so I’m thinking about the modbus binding as a source of the quest. What do you think on this?
Do you have any ideas for me? I’m totally lost on this.
Additionally, I did’nt find UoM handling for ECMA scripts like the DSL rule examples in the documentation https://www.openhab.org/docs/configuration/rules-dsl.html#manipulating-item-states#number-item
Thank you all very much & cheers,