Skip to content

Instantly share code, notes, and snippets.

View vordenken's full-sized avatar
🎯
Focusing

JP vordenken

🎯
Focusing
View GitHub Profile
@vordenken
vordenken / low-battery-level-detection-notification-for-all-battery-sensors.yaml
Last active March 9, 2026 08:54 — 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 certain battery level threshold and if so execute an action.
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').
@vordenken
vordenken / sort-music.py
Created January 26, 2025 15:05
Sort music for Jellyfin (or other software wanting folder structures).
import os
import shutil
from mutagen.easyid3 import EasyID3
from mutagen.mp3 import MP3
def get_metadata(file_path):
try:
audio = EasyID3(file_path)
artists = audio.get('artist', ['Unbekannter Künstler'])
album_artists = audio.get('albumartist', [artists[0]])