Function with payload + X

As I suggested in my previous post:

Peres here

sorry i need to msg with company account. i have limit of message on peres (because it's new account).

I think the output of the blue node is a string "24.0" not a number 24.
In the function use
msg.payload = Number(msg.payload) + 2
which converts the payload to a number before adding the 2. As you have it, because it is a string, it add "2" to the end of the string "24.0" to get "24.02"

bingo!
thanks a lot!

I've updated your forum account 'Transmruk-Peres' so the posting issue shouldn't be a problem now.
Please don't create any more accounts, if you have any further posting issues, just ask a moderator :wink:

i have 2 account on git because in company i have homeassisant and in my home;-)

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