Options for actionable notification to multiple phones

Hi!

I am looking for ways to send an actionable notification to multiple devices from a blueprint.
This is my basic input:

    notify_device:
      name: Mobile device (mobile_app)
      description: The mobile_app device to receive the actionable notification.
      selector:
        device:
          integration: mobile_app

When I add multiple: true I cannot find a way to get the blueprint to work properly.
I was looking at adding a group for this, but the Notify group does not list anything for me to select, so my mobile devices must be a different domain?

image

Is there a way to make a mobile app group, or alternatively how do I get the actionable notification to work for multiple devices?

This is my current logic for the notification:

        sequence:
          - device_id: !input notify_device
            domain: mobile_app
            type: notify
            title: "{{ notify_title_var }}"
            message: "{{ notify_message_var }}"
            data:
              tag: "{{ notification_tag }}"
              car_ui: true
              actions:
                - action: "TURN_OFF_LIGHTS"
                  title: "Turn off"
                - action: "IGNORE"
                  title: "Ignore"

Any help is appreciated, thanks!

IIRC, Device actions do not support the use of templates… so that’s not going to work at all. To use templates for message, title, etc you need to use the specific notify actions.

As documented, Notify groups can be configured in YAML.

An alternative would be to use a Repeat for Each action that uses a template to construct the list of notify actions to use based on the selected devices.

You might want to take a look at how other users have handled the device/notify action issue.

About your first point, that is weird because the code I posted is working, but only for a single device. When I try to make it a repeat with the multiple inputs, it does not work (can’t even save the automation).

About the Notify groups, very interesting. I did not think to check the docs on that because the option is there in the UI to create a Notify group. I wonder why the option is included when it’s not supported?
image

So anyway, I created the notify group and I can see it in Developer Tools and tested the action there and found it to work.
However, I cannot figure out how to reconfigure my blueprint inputs now to accept this group as the device to notify. Should it be a device or entity selector, and which domain?

PS: @Didgeridrew the second link you posted linking to other blueprints is not working for me.

I’m not much of a Device action user, so I could be wrong on that point… maybe something changed recently that I missed given how poorly documented they are.

The option is supported… but there are currently 2 different methods for notifications. HA notifications are in a long-term overhaul process to make thing like what you are trying to easier and more in line with how other actions work.

Prior to last year, all notifier integrations used the method that the Mobile App is currently using. In that method the integrations create specific actions for each notification endpoint. This method is currently the only one that works for notifiers that have complex data.

Late last year the new method was introduced in which all integrations use a universal action, and supply specific entities that can be targeted by that action. So far, only integration that use just the message data variable can use this method. It is these notify entities that can be grouped using the Group Helper.

It’s not a device, it’s an action. Again, this is one of the reasons why notifications are undergoing an overhaul… the action-ness of them makes blueprinting cumbersome and limited.

This was the blueprint I tried to link previously:
https://github.com/Grumblezz/Home-Assistant-Notify-Mobile-Companion-App-Devices/blob/main/notify_devices.yaml


Before we get any more in the weeds… is there are reason you need a Blueprint?

Sending an actionable notification to multiple targets is not that complicated if you don’t need the open-endedness of a Blueprint.

Thank you, that background info is very informative. It’s starting make sense now and explain why there is seemingly so much conflicting info out there, because there are 2 completely different ways to approach it.

So it sounds like at some point I should be able to create the notification group through the UI for the mobile app, but it has not been ported to the “new way” yet? And then it would show up as a device that can handle a notification.

For now, your point about whether I need a blueprint or not is a good one. I guess I default to making blueprints in case I want to make more instances of the same automation down the road. But in this case, it seems that maybe I should just stick with a plain automation to keep this simple since this particular automation is not likely to need more instances in the future. And since things are changing in this space anyway, there may be an easier solution to use when/if I need to make a new instance of this.

I will test with using the notify action and follow up. Thank you for walking me through this!