I have the following end of a short flow that successfully sends a notification to my iPhone with the title, “Freeze Warning” but no message content:
[{"id":"40a2b28786870116","type":"template","z":"96c1068f.cd44d8","name":"Set Message","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"Freezing temperatures are expected {{payload}}.","output":"str","x":870,"y":1240,"wires":[["62c01c920ce018de","442d28829f9a2451"]]},{"id":"62c01c920ce018de","type":"api-call-service","z":"96c1068f.cd44d8","name":"Notify iPhone","server":"296c0678.b5f9ca","version":5,"debugenabled":false,"domain":"notify","service":"mobile_app_iphone","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"title\": \"Freeze Warning\",\t \"message\": \"{{payload}} \"\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1140,"y":1240,"wires":[[]]},{"id":"296c0678.b5f9ca","type":"server","name":"Home Assistant","version":4,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30,"areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m"}]
Here’s the debug result:
_msgid: "d470aa4667c77af2"
payload: "Freezing temperatures are expected Wednesday."
topic: ""
_srcid: "22da97bb4d1ba7a5"
_ts: 1665506249554
I’d expect the message to be displayed as the payload, “Freezing temperatures are expected Wednesday.” Where am I going wrong? It has to be in the syntax of my notification, but I don’t know how to correct it:
{
"title": "Freeze Warning",
"message": "{{payload}}"
}