Hey guys,
I know this is a absolute beginners question but I studied working with messages and watched a few function node videos but it didn't helped me out.
The task is simple. I have a node, watching my dishwasher, which sends some informations on the end of the wash process. I have a Function node subsequently which should convert those properties in a readable text:
Die Spülmaschine ist fertig.
Dauer: {{ payload.time }} Minuten.
Energieverbrauch: {{ payload.energy }} kw/h.
Kosten: {{ payload.cost }} €
This Text should be passed in a function node which should add a title, and edit the payload to go to a telegram sender node. And here I don't know how exactly I can do that.
The is what I got so far:
var payload=msg.payload;
var newMsg = {
title : 'Spülmaschine',
msg.payload : payload ,
type : 'message',
chatId : 'xxxxxxx',
};
return newMsg;
Can you help me and tell me how to get this right?
Thank you