Hi guys,
Currently, in my NodeRed flows, i have alot of Service Calls that use Alexa to make announcements.
I am looking to streamline this and instead have just 1 Service Call node to make announcements.
{
"message": "Front Gate is now open..",
"data": {
"type": "announce"
},
"target": "media_player.ha_group"
}
How can i create a function to pass a msg payload data of just the message portion only that i want to send to my Service Call node to make the Front Gate is now open…
I tried this code but got API error. Not sure if im doing this right?
msg.payload.data = {
"message": "Front Gate is now open..",
};
return msg;