nielsfaber / alarmo

Easy to use alarm system integration for Home Assistant
1.32k stars 119 forks source link

Migrate legacy notification to new format #989

Open xhemp opened 2 months ago

xhemp commented 2 months ago

Checklist

Alarmo Version

v1.10.4

HA Version

2024.7.1

Bug description

0758f9bf553523e177c625406c4c826028b2a760

(Ignore the notify.energy above, just got an example of the message which shows on HA).

I use the notification to write which sensor has been tripped and then it calls my phone using an Asterisk server. I tried to write the notification on yaml but it doesn’t allow me to save it on Alarmo. Am I mixing things up or is this genuine?

This is what I have on the notify bit inside Alarmo:

service: notify.me_asterisk
data:
  message: "House alarm has been triggered! Cause: {{open_sensors|format=short}}."
  title: ""

And this is what I tried which errors out:

service: notify.send_message
target:
  entity_id: notify.me_asterisk
data:
  message: "House alarm has been triggered! Cause: {{open_sensors|format=short}}."
  title: ""

Steps to reproduce

Just try to send a notification on Actions - Notification on Alarmo

Relevant log output

No response

github-actions[bot] commented 1 month ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

nielsfaber commented 1 month ago

Do you have any link to information about this migration? I’m not aware of any recent changes in HA regarding this.

JBlohm commented 1 month ago

New notify entity platform https://developers.home-assistant.io/blog/2024/04/10/new-notify-entity-platform/

The change to an entity-based notification service in Home Assistant was introduced in April 2024. This update shifted the notification platform from using the traditional notify.notify service to a new entity-based model. The new notify.send_message service became the core of this update, allowing users to target multiple notification entities simultaneously. This change means that automations using the old service will need to be updated, as the legacy service is being phased out.

In May 2024, additional enhancements were made, including the introduction of a title option in the send_message service, enabling more integrations to be migrated to this new platform.

michaelblaas commented 4 days ago

Any update on this issue?

If I try to convert the old format to the new format (as shown by topic starter) I get an error when testing or saving:

"Actie notify/send_message kon niet worden uitgevoerd. must contain at least one of entity_id, device_id, area_id, floor_id, label_id."