Persistent Notification
The Persistent Notification integrationIntegrations connect and integrate Home Assistant with your devices, services, and more. [Learn more] can be used to show a notification on the frontend that has to be dismissed by the user.
Automation
Persistent notification triggers enable automations to be triggered when persistent notifications are updated. Triggers can be limited to a specific notification by providing an ID for notification_id, or when this value is omitted the automation will trigger for any notification ID. If no update_type is provided, the automation will trigger for the following update types: added, removed, updated, or current. By providing one or more of these values to the update_type option, the automation triggers only on these update_type events.
Review the Automating Home Assistant getting started guide on automations or the Automation documentation for full details.
An example of a persistent notification trigger in YAML:
automation:
- triggers:
- trigger: persistent_notification
# Optional. Possible values: added, removed, updated, current
update_type:
- added
- removed
# Optional.
notification_id: invalid_config
See Automation Trigger Variables: Persistent Notification for additional trigger data available for conditions or actions.
List of actions
The Persistent Notification integrationIntegrations connect and integrate Home Assistant with your devices, services, and more. [Learn more] provides the following actions. Each link below opens a dedicated page with examples, parameters, and a step-by-step UI walkthrough.
-
Create notification (
persistent_notification.create) Creates a persistent notification in the Home Assistant frontend. -
Dismiss notification (
persistent_notification.dismiss) Removes a single persistent notification from the Home Assistant frontend. -
Dismiss all notifications (
persistent_notification.dismiss_all) Removes all persistent notifications from the Home Assistant frontend.
For an overview of every action across all integrations, see the actions reference.
Use as a notifier
Persistent notifications can also be used as a pre-configured notifier for the Notify integration when that integration is loaded. It is available as notify.persistent_notification. This lets you use it with features that require a notifier, such as notify groups or the Alert integration.
You can place the following attribute inside data for extended functionality:
-
notification_id: When a notification ID is given, it overwrites the notification if one with that ID already exists.