Critical notification when using an automation created with a blueprint and multiple notifications to phones

Hello,

I’ve installed a Unifi Doorbell Pro last week and want to have the notifications go through Home Assistant sent to me and my girlfriend. I am using the Unifi Protect integration together with the Unifi Protect blueprint.

I am only able to sent the notification to my phone, even when stating multiple devices with a ‘,’. For instance:
notify.mobile_app_iphone_1,notify.mobile_app_iphone_2

Also I want to always get a notification with sound. According to the documentation this should be possible to mark the push message as critical. When I add this to the YAML it unfortunately skips the critical part. I tried adding push:, sound: and critical: 1, (of course with the correct indents) to my YAML configuration but it unfortunately doesn’t work.

Down below you can find my YAML file used for the automation. I removed my own attempts as it didn’t work.

image

How will I be able to have it sent a push message to multiple phones and have it marked as critical?

Thank you a lot in advance!

I would create a notification group containing your both phones and then in the automation something like that (this is a copy and paste of one of mine critical alerts for my fire alarm):

service: notify.all_ios_devices
data_template:
  data:
    url: /lovelace/firealarm
    push:
      sound:
        name: default
        critical: 1
        volume: 1
  message:  Your House is on Fire 
  title: FireAlarm Alarm Emergency

and the notification group add something like that to your configuration.yaml (check documentation):

notify:
  - name: all_ios_devices
    platform: group
    services: 
      - service: mobile_app_phone1_phone
      - service: mobile_app_phone2_iphone

Hello @alfwro13
Thanks a lot for your answer. The notification group with the second script you shared worked for me. I am not sure where to and and tweak your first script. Could you point me in the right direction? I guess this should be in the automation file together with my blueprint config?