I utilize scripts for all of my notification needs. It allows me to utilize logic based around certain criteria, like this on that will only notify family members at home. If no one is home it will wait and notify the first person to show up. This also allows me to be able to quickly toggle notifications for my wife when I’m testing automations with notifications.
alias: Notify People at Home
fields:
title:
description: The title of the notification
example: Laundry
message:
description: The message content
example: Washer Finished!
sequence:
- if:
- condition: state
entity_id: zone.home
state: "0"
then:
- wait_for_trigger:
- platform: numeric_state
entity_id: zone.home
above: "0"
else: []
- parallel:
- if:
- condition: state
entity_id: person.bob
state: home
then:
- service: script.notify_bob
data:
title: "{{ title }}"
message: "{{ message }}"
- if:
- condition: state
entity_id: person.mary
state: home
then:
- service: script.notify_mary
data:
title: "{{ title }}"
message: "{{ message }}"
mode: queued
icon: mdi:exclamation-thick
max: 10
The only issue with doing it this way is that the UI to call the script isn’t as nice as calling the notification service directly, but it isn’t too bad to switch to yaml mode and populate the parameters once you get used to it.