fw/home-assistant: pre-existing startup errors and deprecations in the hass container #448

Open
opened 2026-10-09 09:07:35 +02:00 by dominik.polakovics · 0 comments

Found while preparing #447 (journal of the hass container on fw, boot of 2026-10-09 00:45, HA 2026.5.4). None of these are caused by #447; they are independent and can be fixed one by one.

1. ping binary sensors never load

hosts/fw/modules/home-assistant/multimedia.nix lines 24–45 define xbox, ps5, steamdeck as binary_sensor: platform: ping. HA logs three times:
ERROR [homeassistant.components.binary_sensor] The ping platform for the binary_sensor integration does not support platform setup. Please remove it from your config.
The ping integration is config-entry only now. Fix: remove the YAML blocks and create the three entries via the UI (or whatever consumes binary_sensor.xbox etc. needs updating).

2. ipp config entry fails to import pyipp

ModuleNotFoundError: No module named 'pyipp' at startup. An Internet Printing Protocol config entry exists in .storage but ipp is not in services.home-assistant.extraComponents anywhere under hosts/fw/modules/home-assistant/. Fix: either add "ipp" to extraComponents or delete the stale config entry in the UI.

3. Template sensors throw on unavailable/None input

Three TemplateError at startup, all legacy platform: template sensors with no default=:

  • battery.nix:42 {{ states('sensor.sensors_lowest_battery_level')|int <= 30 }}
  • battery.nix sensors_lowest_battery_level value_template (map('int') over battery attributes)
  • 3dprinter.nix:37 {{ state_attr('sensor.creality_extruder', 'temperature') | float | round(1) }}
    Also a Template variable warning: 'jinja2.utils.Namespace object' has no attribute 'battery_critical' from locks.nix:126–133 (ns is created with crit=, read as ns.battery_critical).
    These are the same blocks that must be migrated to the modern template: syntax before any HA >= 2026.6 (legacy platform removed); do the migration and add defaults in one pass.

4. Deprecated YAML options

  • The 'exclude' option near configuration.yaml:1187 is deprecated → history.exclude in default.nix:240. History filtering moved to recorder:; move the entity/domain lists there (recorder.exclude is already used in electricity.nix:96).
  • The 'entity_id' option near configuration.yaml:1660 is deprecated → entity_id = "sun.sun" in the legacy template sensor in battery.nix:9. Goes away with the template migration in item 3.

5. Shelly devices configured by hostname are rejected

ValueError: 'shellyplug-s-living-1.cloonar.smart' does not appear to be an IPv4 or IPv6 address and the same for shellybutton1-e8db84aa136d.cloonar.smart. These are UI config entries (not in the repo); the Shelly integration now requires an IP. Fix in the UI: reconfigure the two entries with their DHCP-reserved addresses from hosts/fw/modules/dnsmasq.nix.

Lower priority, informational

  • aiohttp_fast_zlib: zlib_ng and isal are not available – performance only; could add zlib-ng/isal via extraPackages.
  • Moonraker REST sensors (3dprinter.nix:7,20) and several ESPHome bulbs/presence sensors were unreachable at boot – devices off, not a config problem.
Found while preparing #447 (journal of the hass container on fw, boot of 2026-10-09 00:45, HA 2026.5.4). None of these are caused by #447; they are independent and can be fixed one by one. ### 1. `ping` binary sensors never load `hosts/fw/modules/home-assistant/multimedia.nix` lines 24–45 define `xbox`, `ps5`, `steamdeck` as `binary_sensor: platform: ping`. HA logs three times: `ERROR [homeassistant.components.binary_sensor] The ping platform for the binary_sensor integration does not support platform setup. Please remove it from your config.` The `ping` integration is config-entry only now. Fix: remove the YAML blocks and create the three entries via the UI (or whatever consumes `binary_sensor.xbox` etc. needs updating). ### 2. `ipp` config entry fails to import `pyipp` `ModuleNotFoundError: No module named 'pyipp'` at startup. An Internet Printing Protocol config entry exists in `.storage` but `ipp` is not in `services.home-assistant.extraComponents` anywhere under `hosts/fw/modules/home-assistant/`. Fix: either add `"ipp"` to `extraComponents` or delete the stale config entry in the UI. ### 3. Template sensors throw on `unavailable`/`None` input Three `TemplateError` at startup, all legacy `platform: template` sensors with no `default=`: - `battery.nix:42` `{{ states('sensor.sensors_lowest_battery_level')|int <= 30 }}` - `battery.nix` `sensors_lowest_battery_level` value_template (`map('int')` over battery attributes) - `3dprinter.nix:37` `{{ state_attr('sensor.creality_extruder', 'temperature') | float | round(1) }}` Also a `Template variable warning: 'jinja2.utils.Namespace object' has no attribute 'battery_critical'` from `locks.nix:126–133` (`ns` is created with `crit=`, read as `ns.battery_critical`). These are the same blocks that must be migrated to the modern `template:` syntax before any HA >= 2026.6 (legacy platform removed); do the migration and add defaults in one pass. ### 4. Deprecated YAML options - `The 'exclude' option near configuration.yaml:1187 is deprecated` → `history.exclude` in `default.nix:240`. History filtering moved to `recorder:`; move the entity/domain lists there (recorder.exclude is already used in `electricity.nix:96`). - `The 'entity_id' option near configuration.yaml:1660 is deprecated` → `entity_id = "sun.sun"` in the legacy template sensor in `battery.nix:9`. Goes away with the template migration in item 3. ### 5. Shelly devices configured by hostname are rejected `ValueError: 'shellyplug-s-living-1.cloonar.smart' does not appear to be an IPv4 or IPv6 address` and the same for `shellybutton1-e8db84aa136d.cloonar.smart`. These are UI config entries (not in the repo); the Shelly integration now requires an IP. Fix in the UI: reconfigure the two entries with their DHCP-reserved addresses from `hosts/fw/modules/dnsmasq.nix`. ### Lower priority, informational - `aiohttp_fast_zlib: zlib_ng and isal are not available` – performance only; could add `zlib-ng`/`isal` via `extraPackages`. - Moonraker REST sensors (`3dprinter.nix:7,20`) and several ESPHome bulbs/presence sensors were unreachable at boot – devices off, not a config problem.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Cloonar/nixos#448
No description provided.