v1.7.0 - Module split, Dependabot, Diagnostics
Module split (no behaviour change)
The four largest source files are split into single-responsibility modules:
_auth.py(206 lines) — the 5-step authentication flow as free functions operating on a session and a smallAuthStatebag._redirects.py(99 lines) — manual redirect resolution, including the same-origin and HTTPS-only enforcement (CVE-2018-18074-class protection)._sensor_descriptions.py(96 lines) — the 12 sensor entity descriptions, with a small helper to deduplicate the m³ / litres totals.diagnostics.py(51 lines) — Home Assistant "Download diagnostics" support, with username, contract number and password redacted.
File-size impact:
| File | Before | After |
|---|---|---|
api.py |
297 | 146 |
_http.py |
237 | 151 |
sensor.py |
173 | 64 |
statistics.py (orchestrator function) |
~95 lines | ~38 lines |
No file in the integration now exceeds 210 lines.
New: Diagnostics
A "Download diagnostics" button is now available on the integration page (Settings → Devices & Services). It produces a sanitized JSON dump with the integration version, coordinator state, last error, and current sensor data — with credentials redacted. Useful when reporting bugs.
Maintenance: Dependabot
Weekly bumps for GitHub Actions and pip test dependencies, grouped to keep the PR noise low.
Quality scale
Gold rule diagnostics: done. (Silver remains the declared scale until more Gold rules are met.)
Robustness
- Defensive parsing on
ConsumptionData: a missingvolumeConsoEnM3in any monthly entry no longer crashes the year-total computation.
No user-facing change. Update via HACS as usual.