Change Watt Number in Normal number

Hello, please excuse my bad english.
In my IoBroker, I want a number in an adapter, e.g. Convert "197.20000000000002 W" to a 'normal' number like e.g. "197" how could I realize this in Node Red?
TheJoJo

In a function node

msg.payload = parseInt(msg.payload); // or parseFloat if you want a decimal number
return msg;

Or

in a change node
set msg. payload
to value of J: $number(substringBefore($$.payload, "."))
Or change "." to " " for a decimal number

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.