I am trying to use a Function Node to pull a stored temperature value and format it so that I can send it to a Call Service Node in Home Assistant. This code works just as I want. However, the Function Node has a Red Triangle and the error says "Invalid properties: Error in JavaScript Code". Then, I have to deal with the warning every time I deploy
Any ideas? I am sure it is something simple. I rarely, if ever, use function nodes so I am a newbie with them.
var currentT = Number(flow.get("current1stFloorSP"));
node.warn("currentT: " + currentT);
newmsg = {
payload: {
data: {
"temperature": currentT
}
}
};
return newmsg;