Skip to content

Commit

Permalink
Closes out #1498 with some alerting automations
Browse files Browse the repository at this point in the history
  • Loading branch information
CCOSTAN committed Feb 12, 2025
1 parent 40c08da commit 6d2830f
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions config/packages/backups.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#-------------------------------------------
# @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
#-------------------------------------------
# Added Duplicati to HA - https://github.com/CCOSTAN/Home-AssistantConfig/issues/1498

#-------------------------------------------
automation:
- alias: 'Backup Job Failed Notification'
id: 5b3a4c89-1234-4567-8901-23456789abcf
trigger:
- platform: state
entity_id: sensor.dockerconfigs_backup_error_message
from: '-'
action:
- service: script.notify_engine
data:
who: 'carlo'
value1: 'Backup Job Error!'
value2: "Error: {{ states('sensor.dockerconfigs_backup_error_message') }}"

- alias: 'Backup Size Change Alert'
id: 5b3a4c89-1234-4567-8901-23456789abd0
trigger:
- platform: numeric_state
entity_id: sensor.dockerconfigs_backup_target_size
above: 10000000000 # Alert if backup size is over 10GB
action:
- service: script.notify_engine
data:
who: 'carlo'
value1: 'Backup Size Warning'
value2: >
Backup target size has grown to {{ states('sensor.dockerconfigs_backup_target_size') | float / 1000000000 }} GB.
Please verify backup contents and available storage.

0 comments on commit 6d2830f

Please sign in to comment.