Skip to content

v1.10.3 - Forward-compat with HA 2026.11 (mean_type)

Choose a tag to compare

@EnO33 EnO33 released this 27 Apr 06:15

Forward-compatibility fix

Home Assistant 2026.11 will require StatisticMetaData.mean_type to be set explicitly when calling async_import_statistics. Without it, statistics import would silently break for everyone come November.

This release fixes that ahead of the deadline by replacing the legacy has_mean=False flag (which HA already deprecated and removed in 2026.4) with the canonical mean_type=StatisticMeanType.NONE. StatisticMeanType is a typed enum (NONE, ARITHMETIC, CIRCULAR); water consumption is a counter so NONE is the right value.

Breaking change: minimum HA version

StatisticMeanType was added in HA 2025.4, so the integration now requires Home Assistant 2025.4 or later. The previous floor (2024.1) is two years old; most HACS users are well past it. HA 2026.11 will mandate this anyway.

If you're still on HA 2024.x, please update HA before installing this release. The previous v1.10.2 keeps working until HA 2026.11.

Other clean-up

  • Drop the has_mean=False flag (deprecated, removed in HA 2026.4)
  • Drop the # type: ignore[typeddict-item] we used to silence mypy
  • unit_class=None added explicitly so HA derives it from unit_of_measurement
  • Test coverage updated to assert on metadata["mean_type"]

Verified

  • Full local validation (ruff, mypy strict, pytest 30 passed)
  • All 5 CI jobs green
  • Live smoke test on a Raspberry Pi against SEM (Ventabren contract) — auth + fetch + statistics path all green

Closes #19.