Hi!
How can I use a property of message in notify call service?
I’m trying to replace nome_sensor
in message, but no success. I can see that property is being sent, but is not replaced in notify message.
This is my notify json (google assistant):
{
"title": "Movimento detectado",
"message": "Foi detectado um movimento na casa! Sensor: {{nome_sensor}}",
"data": {
"color": "red",
"channel": "alarm_stream",
"importance": "max",
"vibrationPattern": "1000, 1000, 1000, 1000, 1000, 1000, 1000",
"ledColor": "red",
"persistent": "true",
"tag": "persistent",
"priority": "high"
}
}
The entire msg that is being into notify node is:
{"_msgid":"407e71165278f54a","payload":1639175866531,"topic":"","nome_sensor":"Fundo"}
This is my entire test flow:
[
{
"id": "eda7c20ecbf16c9d",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": "",
"env": []
},
{
"id": "789e9e956ac2be24",
"type": "inject",
"z": "eda7c20ecbf16c9d",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
},
{
"p": "nome_sensor",
"v": "Fundo",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payloadType": "date",
"x": 390,
"y": 540,
"wires": [
[
"3e44f7e6ba8539b9"
]
]
},
{
"id": "3e44f7e6ba8539b9",
"type": "api-call-service",
"z": "eda7c20ecbf16c9d",
"name": "Notifica",
"server": "2ba92c0c.9dae24",
"version": 3,
"debugenabled": false,
"service_domain": "notify",
"service": "mobile_app_redmi_k20_pro",
"entityId": "",
"data": "{\t \"title\": \"Movimento detectado\",\t \"message\": \"Foi detectado um movimento na casa! Sensor: {{nome_sensor}}\",\t \"data\": {\t \"color\": \"red\",\t \"channel\": \"alarm_stream\",\t \"importance\": \"max\",\t \"vibrationPattern\": \"1000, 1000, 1000, 1000, 1000, 1000, 1000\",\t \"ledColor\": \"red\",\t \"persistent\": \"true\",\t \"tag\": \"persistent\",\t \"priority\": \"high\"\t \t }\t}",
"dataType": "jsonata",
"mergecontext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 700,
"y": 540,
"wires": [
[
"65e6fb496d9de6d9"
]
]
},
{
"id": "65e6fb496d9de6d9",
"type": "debug",
"z": "eda7c20ecbf16c9d",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 990,
"y": 540,
"wires": []
},
{
"id": "2ba92c0c.9dae24",
"type": "server",
"name": "Home Assistant",
"version": 2,
"addon": true,
"rejectUnauthorizedCerts": true,
"ha_boolean": "y|yes|true|on|home|open",
"connectionDelay": true,
"cacheJson": true,
"heartbeat": false,
"heartbeatInterval": 30
}
]