fw: migrate HA legacy template entities to modern template:, then pin to 2026.6 #137
Labels
No labels
bug
enhancement
in-progress
needs-info
needs-triage
p0
ready-for-agent
ready-for-human
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Cloonar/nixos#137
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
fw's Home Assistant is pinned (via
fetchGitinhosts/fw/modules/home-assistant/default.nix) to HA 2026.5.4, deliberately held just below 2026.6. HA 2026.6 removed the legacy template entity platforms (- platform: templateundersensor:/binary_sensor:/light:with asensors:/lights:dict). We still use 11 of these, so they must be migrated to the modern top-leveltemplate:integration before the pin can move to 2026.6+.This is the follow-up to the 2025.3.4 → 2026.5.4 bump (PR #138).
Scope
1. Migrate legacy template entities → modern
template:integrationPattern change:
value_template→state:,friendly_name→name:, add anunique_id, drop the per-platformsensors:/lights:wrapper. Sites:default.nix—bedtime_alarmtemplate sensorbattery.nix—sensors_lowest_battery_level(sensor) andsensor_low_battery(binary_sensor)ac.nix:1043dprinter.nix:33,3dprinter.nix:48locks.nix:121light.nix:461—hallway_group_proxytemplate light (see #3)multimedia.nix:46,multimedia.nix:171electricity.nix:11—electricity_pricesensor2. Re-verify legacy light platforms before 2026.6
light.nixuses- platform: switch(Light Switch) and- platform: group(Light Group) entries. These are NOT part of the 2026.6 template removal, but confirm they still load on 2026.6; migrate toswitch_as_x/ modern group helpers if not.3. Fix the template-light proxy color temp
light.nix:461-505(hallway_group_proxy) passescolor_temp(mireds) tolight.turn_onin itsset_temperaturescript — already broken on 2026.3+ if invoked (mireds param removed). Convert tocolor_temp_kelvinas part of migrating this entity.4. Bump the pin to 2026.6+ and verify
Once 1–3 are done, move the
default.nixfetchGitrev to a nixos-unstable commit carrying HA ≥ 2026.6 and verify (build + a real login + HA Repairs panel clean).Notes / nice-to-haves
epex_spot(electricity.nix:4) is sourced from the host channel (pkgs.home-assistant-custom-components) while HA itself is pinned. That Python 3.13↔3.14 mismatch is what broke auth loading on the 26.05 bump. Consider sourcing customComponents from the pinned nixpkgs so HA and its components stay version-locked.v0.7.2(presense.nix); bump tov0.8.5(works on 2026.5/2026.6, only a deprecation warning).custom-components/scheduler.nixis commented out; if scheduler is used via HACS, ensure the HACS-installed version supports 2026.6.hassDB backup before the 2026.6 bump.Caveat
UI-managed automations in
/var/lib/hass/automations.yamlare not in the repo and weren't reviewed. After each bump, check Settings → System → Repairs for legacy-template / color_temp issues there too.