Document use of Persistent Notification as a notifier (#23336)

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
Kevin Cathcart 2023-06-27 06:58:06 -04:00 committed by GitHub
parent 3ee497577b
commit 432b5bdd28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View File

@ -13,7 +13,7 @@ ha_integration_type: entity
The `notify` integration makes it possible to send notifications to a wide variety of platforms. To use it you have to setup at least one notification target (notifier), check the [integrations list](/integrations/#notifications) for one that fits your use case. The `notify` integration makes it possible to send notifications to a wide variety of platforms. To use it you have to setup at least one notification target (notifier), check the [integrations list](/integrations/#notifications) for one that fits your use case.
If you want to send notifications to the Home Assistant web interface, you may use the [Persistent Notification integration](/integrations/persistent_notification/). If you want to send notifications to the Home Assistant web interface, you may use the [Persistent Notification integration](/integrations/persistent_notification/). The Persistent Notification integration is also available as an automatically configured notifier. See [its documentation](/integrations/persistent_notification/) for more details.
## Service ## Service

View File

@ -132,3 +132,13 @@ Choose the **Services** tab from the **Developer Tools** sidebar item, then sele
} }
``` ```
This will create the notification entry shown above. This will create the notification entry shown above.
### Use as a notifier
Persistent notifications can also be used as a pre-configured notifier for the [Notify integration](/integrations/notify/) if that integration is loaded. It is available as `notify.persistent_notification`. This enables it to be used with features that require a notifier like [Notify Groups](/integrations/group/#notify-groups) or the [Alert integration](/integrations/alert/).
The following attributes can be placed inside `data` for extended functionality.
| Service data attribute | Optional | Description |
| ---------------------- | -------- | ----------- |
| `notification_id` | yes | If `notification_id` is given, it will overwrite the notification if there already was a notification with that ID. |