mirror of
https://github.com/Matysh/houseplan-card
synced 2026-10-07 15:09:30 +00:00
General settings offer All / Low only / None for battery indicators as a three-button segmented control, the same visual as the light-source choice in the device dialog. Low only keeps just the red low state (below 20 %, or a binary battery sensor that is on); normal, warning and unknown are hidden. Storage keeps #792 compatibility: absent = All, false = None, the exact string "low" = Low only. The backend accepts bool or "low" and refuses any other value; old frontends read "low" as All, old backends refuse to save it (documented in CONFIG-COMPATIBILITY). One presentation option (batteryLowOnly) filters the resolved indicator, so View, kiosk, 2.5D, space-card and the device dialog preview share the same rule. Track raised ship -> show: new i18n keys, a new config value and Python. Tests: unit (mode resolver, write, dirty, low-only presentation), backend validator and support package, smoke_device_battery (low-only keeps only red), smoke_general_settings_form (radios, save/reopen/clean, All removes the key). New mutant battery-low-only-shows-every-state; the backend mutant anchor moves to the new validator. Issue: #807 User-Visible: yes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018qZfe7YS4rqEMKoVeS3GKd