Hi,
I've recently started using node red within my home assistant setup.
I want to be able to customize notification messages by passing previous payload information with text. A simple example I want to send notifications saying something like:
Motion detected on {camera name}.
I have used various different msg payload variables for testing such as {{payload}} {{mydata}} & {{topic}}. From checking the debug logs, they all seem to contain data, but when the notifications appear they don't show any data. The text appears, but not the variables.
The flows run without error. It is possible to embed variables into the change node like I have below or should I be using another method to combine, text and variables together?
[
{
"id": "3521d974adb3acf6",
"type": "change",
"z": "71ec2bc5edd49701",
"name": "General Notification",
"rules": [
{
"t": "set",
"p": "mydata",
"pt": "msg",
"to": "Change Topic",
"tot": "str"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "{}",
"tot": "json"
},
{
"t": "set",
"p": "payload.data",
"pt": "msg",
"to": "{\"title\":\"Title-Theta {{mydata}} Motion\",\"message\":\"Theta {{mydata}} {{topic}} {{payload}} End\",\"data\":{\"priority\":\"-2\"}}",
"tot": "json"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 360,
"y": 160,
"wires": [
[
"877badf05418c075",
"6ba6d4a5cef54f90"
]
],
"info": "Default value of 0 if not provided. An integer value ranging [-2, 2] representing:\n-2 Very Low\n-1 - Moderate\n0 - Normal\n1 - High\n2 - Emergency"
}
]```