Notification sur iPhone

Bonjour,

Je ne comprends pas ce message d’erreur qui apparaît sur le call service notify

Call-service error. expected dict for dictionary value @ data['data']

Il doit y avoir un problème de syntaxe mais je ne trouve pas lequel, et le message est le même quand je prends l’exemple data de Node Red…
Merci pour votre aide,
patrickp78

[{"id":"0f6745da80b26fb3","type":"inject","z":"6b9b906ca74dbf65","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":140,"y":1380,"wires":[["f288570fdfba00d1"]]},{"id":"f288570fdfba00d1","type":"api-current-state","z":"6b9b906ca74dbf65","name":"T° Rapsberry","server":"f1388c55.bbcd1","version":3,"outputs":2,"halt_if":"28","halt_if_type":"num","halt_if_compare":"gte","entity_id":"sensor.smart_hygrometer_00cf_temperature","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":350,"y":1380,"wires":[["836f69abc08b6f1f","1437d64bea11d274"],[]]},{"id":"836f69abc08b6f1f","type":"debug","z":"6b9b906ca74dbf65","name":"debug 254","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":590,"y":1420,"wires":[]},{"id":"1437d64bea11d274","type":"api-call-service","z":"6b9b906ca74dbf65","name":"","server":"f1388c55.bbcd1","version":5,"debugenabled":false,"domain":"notify","service":"mobile_app_iphone_11_pp","areaId":[],"deviceId":[],"entityId":[],"data":"{\"message\":\"Alerte ! La T° du Rapsberry dépasse 38°C\",\"title\":\"T° Rapsberry\",\"target\":\"platform specific\",\"data\":\"platform specific\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":660,"y":1360,"wires":[["4f6aec4beb92748b"]]},{"id":"4f6aec4beb92748b","type":"debug","z":"6b9b906ca74dbf65","name":"debug 255","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":910,"y":1360,"wires":[]},{"id":"f1388c55.bbcd1","type":"server","name":"Home Assistant RBT","addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"","connectionDelay":false,"cacheJson":false,"heartbeat":false,"heartbeatInterval":"","statusSeparator":"","enableGlobalContextStore":false}]

Salut,
Data n’est pas bon, mais comme il est optionnel, pas besoin de le mettre

C’est bon, merci pour le tuyau !

Bonjour,

Voici un example d’utilisation de data pour des « Actionnable Notifications ».
J’envoie une image et un fichier audio lorsqu’ une caméra de surveillance se déclenche.
Le fichier audio me dit où est la détection.

json uilisé sur Node-Red

{
    "message": "{{detection}} detected in the garage",
    "title": "Motion Detected",
    "data": {
        "image": "/local/snapshots/garage.jpg",
        "push": {
            "sound": "{{detection}}_garage.wav",
            "volume": "0.8",
            "critical": "1"
        },
        "url": "/card-cameras/"
    }
}

Variante:

{
    "message": "{{detection}} detected at the front door.",
    "title": "Motion Detected",
    "data": {
        "image": "/local/snapshots/doorbell.jpg",
        "push": {
            "sound": "{{detection}}_frontdoor.wav",
            "volume": 0.8,
            "critical": 1
        },
        "actions": [
            {
                "action": "URI",
                "title": "Open Cameras",
                "uri": "/card-cameras/"
            }
        ]
    }
}

La variable {{ detection }} contient (Person, Car, Package) en fonction de la camera et du type de détection et est aussi utilisée pour le message audio.

Cordialement,

Abel