Events
Event | Event Data |
---|---|
auto_backup.backup_start |
{"name": "NAME"} |
auto_backup.backup_successful |
{"name": "NAME", "slug": "SLUG"} |
auto_backup.backup_failed |
{"name": "NAME", "error": "ERROR"} |
auto_backup.purged_backups |
{"backups": ["SLUG"]} |
Example Automation Using Events#
Blueprint
Send notifications based on events created by the Auto Backup integration, such as when a backup fails.
Notify on Backup Failure
- alias: "Notify Backup Failure"
trigger:
platform: event
event_type: auto_backup.backup_failed # (1)
action:
service: persistent_notification.create # (2)
data:
title: "Backup Failed."
message: |-
Name: {{ trigger.event.data.name }}
Error: {{ trigger.event.data.error }}
- We listen for the
auto_backup.backup_failed
event. - Create a persistent notification on failure with the backups name and the error.