ha: add universal media-partition low-space guard for Frigate

Adds a command_line sensor (HAOS Media Partition Free, df of /media =
sda8) and an automation that stops the Frigate add-on when free space
drops below 50 GB for 2 min. Protects HAOS Core from the VAULT1 CIFS
fallthrough fill scenario (RB-001). Fires regardless of CIFS mount
state — the mount sensor can be stale during the crisis. Stop-only +
max-priority ntfy alert; no auto-remount (needs admin token).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
tommy
2026-06-27 21:33:28 -05:00
parent 16489cabe5
commit 50e3107e38
2 changed files with 37 additions and 0 deletions
+11
View File
@@ -24,6 +24,17 @@ command_line:
scan_interval: 300
payload_on: "1"
payload_off: "0"
- sensor:
name: "HAOS Media Partition Free"
unique_id: haos_media_partition_free
# df of /media reports the DATA partition (sda8) that fills when VAULT1
# CIFS falls through. When CIFS is healthy this reads sda8 free (~1.x TB),
# NOT the 3.6T CIFS share — that's your post-reload sanity check.
command: "df -P -k /media | awk 'NR==2{printf \"%.1f\", $4/1048576}'"
unit_of_measurement: "GB"
state_class: measurement
scan_interval: 300
value_template: "{{ value | float(0) }}"
rest_command:
ntfy_grafana_alerts: