I have a input datetime helper going into a change node with the time being sent in msg.time. How do I code the change node to get it to output its msg.payload as “on_override {{msg.time}}”
So for example, it would send “on_override 06:50”
I have a input datetime helper going into a change node with the time being sent in msg.time. How do I code the change node to get it to output its msg.payload as “on_override {{msg.time}}”
So for example, it would send “on_override 06:50”
Just went through the learning curve about JSONata expressions in change nodes…You don’t use mustache, instead it’s just the relative path reference, so you can use mustache in a template node or in a a change node try "on_time "&$.time
Easiest way is just a change node.
Use ‘change’ option, or preferably ‘JSONata’. Mustache templating is not universal in Node-RED and does not work in the change node.
You can also use ‘function’ and then use plain java
msg.payload = “on_override ” + msg.time;
return msg;