SgtBatten / HA_blueprints

Somewhere to store automation blueprints
151 stars 55 forks source link

[Feature Request]: notification for multiple devices #206

Closed rwez closed 1 month ago

rwez commented 1 month ago

Describe what you are trying to accomplish and why in non technical terms I want to be able to alert multiple phones. At this moment, the groups option does not allow to 'select' a group, you have to fill in the group name, but that doesn't work.

Describe the solution you'd like if there is a group of devices you want to alert, be able to select it, like you do with devices. Also, if you have filled in a group one can not deselect a device, although the description says we can leave it blank, but that is not allowed; one can not save the script.

SgtBatten commented 1 month ago

but that doesn't work.

It does work. please provide more details.

if there is a group of devices you want to alert, be able to select it, like you do with devices

Home assistant does not provide a group selector i can use

Also, if you have filled in a group one can not deselect a device, although the description says we can leave it blank, but that is not allowed; one can not save the script.

this is a change that HA introduced a while ago. just enter a device regardless. it gets ignored if a group is used.

rwez commented 1 month ago

On 11/05/2024 07:22, SgtBatten wrote:

but that doesn't work.

It does work. please provide more details.

if there is a group of devices you want to alert, be able to
select it, like you do with devices

Home assistant does not provide a group selector i can use

this is strange, since a group is an entity. suppose you have a group named blabla, then the entity is group.blabla. this should be selectable, just like with device. If I fill in group.blabla, nothing happens in terms of notifications.

-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.

SgtBatten commented 1 month ago

when you create a notify group no such group.blabla is created. only a service gets created called notify.blabla.

you need only enter the name blabla or notify.blabla

If you have a group.blabla, you have not made a notification group, but a regular group.

acandido commented 1 month ago

Adding to this, I'm seeing behaviour where the notify group doesn't work as well. For reference, calling the notify service on my group does work, similar to this:

service: notify.all_devices data: message: test title: test

When I try to use "all_devices" I get the following message when I try to save an automation created with the blueprint:

"Message malformed: Unknown device ''"

SgtBatten commented 1 month ago

"Message malformed: Unknown device ''"

You need to set a device. Home assistant update in November last year made it mandatory. No change to the behaviour of the blueprint will occur, just set one.

acandido commented 1 month ago

"Message malformed: Unknown device ''"

You need to set a device. Home assistant update in November last year made it mandatory. No change to the behaviour of the blueprint will occur, just set one.

Thanks, that fixed it! Likely needs a documentation update as the blueprint states the device field can be left blank if a group is being used.