#Trouble converting automation to node-red

1 messages · Page 1 of 1 (latest)

sleek mulch
#

Hey all... I feel like this should be easy but I'm struggling with a few things:

When using notify.mobile_app_<your_device_id_here>, I don't have any issues putting a message in an Action node. BUT per https://companion.home-assistant.io/docs/notifications/critical-notifications/ under "Android Example," I need to add the bit about ttl: 0, priority: high and I have yet to come up with a way to do this that works. I've tried using various iterations of nested curly braces but it doesn't seem to work...

{"data":{"title":"Wife@work","ttl": "0","priority":"high"}}

What am I missing?

The configuration and behavior of critical notifications differ between iOS and Android.

valid kiln
#
{"data": {"title": "Wife@work", "data": {"ttl":0, "priority": "high"}}}
#

Here's a nicer way of looking at that which will probably help you understand the YAML version:

{
    "data": {
        "title": "Wife@work",
        "data": {
            "ttl": 0,
            "priority": "high"
        }
    }
}
sleek mulch
#

Thank you! I'm still getting an error, what am I missing here?
[{"id":"ddf643f810e1f8d3","type":"api-call-service","z":"86cb4629dffa7bd8","name":"Notify Pixel 6b","server":"ee1673f4.859eb","version":7,"debugenabled":false,"action":"notify.mobile_app_pixel_6b","floorId":[],"areaId":[],"deviceId":[],"entityId":[],"labelId":[],"data":"{\"data\": {\"title\": \"Wife@work\", \"data\": {\"ttl\":0, \"priority\": \"high\"}}}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"notify","service":"mobile_app_pixel_6b","mergecontext":"","x":780,"y":1800,"wires":[[]]},{"id":"8eee36aabad9c187","type":"inject","z":"86cb4629dffa7bd8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":600,"y":1820,"wires":[["ddf643f810e1f8d3"]]},{"id":"ee1673f4.859eb","type":"server","name":"Home Assistant","version":5,"addon":false,"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","enableGlobalContextStore":true}]
Edit: oof that's ugly, my apologies. lol

valid kiln
#

I'm not familiar with NodeRed, so unfortunately someone else will need to help with that side of things