#Function Node += 1
1 messages · Page 1 of 1 (latest)
reading the other comments a saw tinkerer stating the problem to chatgpt, tried that, seems it's a string not a number so i have to write msg.payload = Number(msg.payload) + 1;
1 messages · Page 1 of 1 (latest)
Hi, trying to add one to in incoming payload value of 45.0.
msg.payload += 1 gives me an output value of 45.01 not 46.0
Tried different values of += 1.0 or += 1.00 but it will added the value to second decimal point behind the comma? What am I doing wrong?
reading the other comments a saw tinkerer stating the problem to chatgpt, tried that, seems it's a string not a number so i have to write msg.payload = Number(msg.payload) + 1;