alarm stream stuff has been supported for some time, a few examples can be seen here
alias: Emergency Alert
sequence:
- service: notify.phone_notifications
data:
title: 'off'
message: command_dnd
- service: notify.phone_notifications
data:
title: '{{ volume|default("6", true) }}'
message: command_volume_level
data:
channel: alarm_stream
- service: notify.phone_notifications
data:
title: '{{ title|default("Ring", true) }}'
message: '{{ message|default("Ring", true) }}'
data:
channel: alarm_stream
priority: high
ttl: 0
tag: '{{ tag }}'
group: '{{ group }}'
actions:
- action: alarm-arm-silence
title: Silence
- action: alarm-arm-disarm
title: Disarm
mode: parallel
description: Sends an emergency alert to phones even on DND with appropriate Volume
fields:
volume:
description: Volume on the device
example: 6
title:
description: Title of the android alert
example: Default Title
message:
description: Message of the android alert
example: Default Message
max: 3
icon: mdi:phone-alert-outline
This has been working for me. Ensure the alarm stream channel is at the correct volume and then notify it. I also choose to disable DND just in case. If it is a true emergency, I want my phone to alert for anything anyway.
Is this an automation you are using and if not, where do you have that set up? I tried to use it as an example to create my own, but can’t get the syntax right. I know the post is over 6 months old, so perhaps some of the changes in HA required modification from what you had posted.
share the YAML you used, the docs are kept up to date and not much here has changed since the feature was introduced.
Sorry, I thought I had replied to calisro above. I was trying to use their code in an automation, but I figured out it is not an automation, I think it is a script?
When I use it in a script, I get an error “Unable to find service notify.phone_notifications”
I’ll check out the docs and see if I can’t get it sorted from there!
That is notification group I have.
- name: phone_notifications
platform: group
services:
- service: mobile_app_rob_pixel_4a_5g
- service: mobile_app_rob_pixel_4a_5g_2
You can just use whatever you want to notify.
It is a script but pretty easy to convert to a automation itself.