Hi Neil, thanks for the snippet. I tried everything without success.
I tried to convert the Dev Tools version to Yaml using a online converter to be ABSOLUTELY sure.
It sounds like a bug to me, or a strange combination of HASS and iOS App Version. I’ll try with the next releases. The only difference between my version and yours is that I use data_template: after service line. But if I change it to data: I don’t receive any notification.
Wooo, just found what was going wrong.
I tried to remove the multiple entities and leave a single one for testing.
I switched than back to data: rather than data_template
- alias: 'Ritorno a casa - Notifica cellulare'
trigger:
platform: state
entity_id: person.giulio
to: 'home'
action:
- service: notify.mobile_app_iphone
data:
title: 'Smart Home'
message: 'Giulio è rientrato'
data:
push:
sound:
name: default
critical: 1
volume: 1.0
This version work seamlessly. Now I’d like to understand how to create a version where I can use multiple entities triggering the automation and replacing the trigger entity friendly name in the message.
Anyone can help ?
Does anyone know why critical: 0 seems to send a notification sound with no actual notification? I’m trying to get a critical notification if I left something open at home after I leave, and a regular notification if everything is closed up properly, but when critical is 0, I get the sound like I get a notification but nothing actually ends up coming through. This also happens if I remove the template and just set critical:0
I managed to get mine working. Here are the JSON codes.
{
"title": "Motion Detected",
"message": "Press and hold to see live feed",
"data": {
"subtitle": "Someone at the front door.",
"push": {
"sound": {
"name": "3rd_party_critical.caf",
"critical": 1,
"volume": 1 },
"category": "camera"
},
"entity_id": "camera.rpizero2w"
}
}