feat(nut): report outage duration and battery % in ntfy
ONBATT records the epoch start time and appends current battery charge; ONLINE appends battery charge and the total outage duration (HH:mm:ss) computed from the recorded start, then clears the state. State lives in /run so it self-clears on reboot. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -61,3 +61,8 @@ nut_ntfy_server: https://ntfy.jokester.fr
|
||||
|
||||
# Path of the deployed NOTIFYCMD wrapper.
|
||||
nut_notify_script_path: /usr/local/bin/ups-notify
|
||||
|
||||
# Where ups-notify records the epoch timestamp of the last ONBATT event, so the
|
||||
# ONLINE notification can report total outage duration. Lives under /run so it
|
||||
# is cleared on reboot (stale outage state is meaningless after a reboot).
|
||||
nut_outage_state_file: /run/ups-notify-outage
|
||||
|
||||
Reference in New Issue
Block a user