Any pointers will be appreciated.
Need the conversion to make my elec import/export numbers behave the right way!
I will answer my own question...
After a lot of struggle, this seems to be the simple solution:
var y = msg.payload;
var x = -y;
msg.payload = x;
No need to create extra variables
msg.payload = msg.payload * -1;
Omg! that simple!
Spend a morning searching to do so!
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.