diff --git a/blog/2024-05-03-notify-title.md b/blog/2024-05-03-notify-title.md new file mode 100644 index 00000000..d2609a13 --- /dev/null +++ b/blog/2024-05-03-notify-title.md @@ -0,0 +1,20 @@ +--- +author: Jan Bouwhuis +authorURL: https://github.com/jbouwh +authorImageURL: https://avatars.githubusercontent.com/u/7188918?s=96&v=4 +title: Second phase of notify entity platform implementation +--- + +### Title option for send_message service notify entity platform + +Recently we added the notify [entity platform](https://developers.home-assistant.io/docs/core/entity/notify/). The new `notify` platform method implements service `send_message`. This service now also accepts an optional `title` as an argument. This allows some new integrations that can be migrated now to use the new entity platform: + +- cisco_webex_teams +- file +- sendgrid +- syslog +- tibber + +The [architecture discussion](https://github.com/home-assistant/architecture/discussions/1041) is still ongoing. + +When integrations are migrated, users will need to use the new `notify.send_message` service, so the migration changes will cause automations to break after the deprecation period is over. diff --git a/docs/core/entity/notify.md b/docs/core/entity/notify.md index 701e97cc..04e58ba6 100644 --- a/docs/core/entity/notify.md +++ b/docs/core/entity/notify.md @@ -32,9 +32,9 @@ The send message method is used to send a message to a device or service. class MyNotifier(NotifyEntity): # Implement one of these methods. - def send_message(self, message: str) -> None: + def send_message(self, message: str, title: str | None = None) -> None: """Send a message.""" - async def async_send_message(self, message: str) -> None: + async def async_send_message(self, message: str, title: str | None = None) -> None: """Send a message.""" ```