Skip to content

Instantly share code, notes, and snippets.

@jefft4
jefft4 / disk_tests.sh
Last active April 19, 2023 17:33
SMART disk self-test script
#!/bin/bash
#
###################################################################
#
# Run short SMART self-test on all drives and email the result.
# Populate DISKLIST with your drive devices (w/o the '/dev/' part)
# and MailTo, MailFrom, MailSubject with your email header info.
#
# Your system needs a mailer set up for this to work as-is.
# Home Assistant parts require a suitable MQTT sensor definition.
@jefft4
jefft4 / low-battery-level-detection-notification-for-all-battery-sensors.yaml
Last active April 11, 2023 08:03 — forked from sbyx/low-battery-level-detection-notification-for-all-battery-sensors.yaml
Home Assistant Blueprint: Low battery level detection & notification for all battery sensors
blueprint:
name: Low battery level detection & notification for all battery sensors
description: Regularly test all sensors with 'battery' device-class for crossing
a battery level threshold and execute an action with a list of low battery reports.
domain: automation
input:
threshold:
name: Battery warning level threshold
description: Battery sensors below threshold are assumed to be low-battery (as
well as binary battery sensors with value 'on').