Files
nixos-servers/services/home-assistant
Torjus Håkestad 9ed11b712f
All checks were successful
Run nix flake check / flake-check (push) Successful in 2m13s
home-assistant: fix Jinja2 battery template syntax
The template used | min(100) | max(0) which is invalid Jinja2 syntax.
These filters expect iterables (lists), not scalar arguments. This
caused TypeError warnings on every MQTT message and left battery
sensors unavailable.

Fixed by using proper list-based min/max:
  [[[value, 100] | min, 0] | max

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-09 16:12:59 +01:00
..