Hi
I have this inject node, and works well.

How do I make a msg.topic and msg.payload function, so it will work as the inject node?
Hi
I have this inject node, and works well.

How do I make a msg.topic and msg.payload function, so it will work as the inject node?
The equivalent Function node would be:
msg.payload = {
"warning": { ... }
}
msg.topic = "zigbee2mqtt/R_Alarm_Køkken/set"
return msg
Hi knolleary
And then after the question, then I found Sending value from array to mqtt in nodered
But can see that it's almost the same as you wrote.
Thx alot. 