✨ Features
- Configurable request timeout — new
numberentity "Request timeout" (1–30 s, default 5 s), adjustable at runtime like the polling interval. The pump's embedded CGI server is slow/flaky over the LAN, so the default timeout is raised from 2 s to 5 s to avoid falsetimed out. Both the polling interval and the timeout are now adjustable from the UI so the pump is not overloaded.
🐛 Fixes
- api: catch
json.JSONDecodeError(non-JSON / empty body no longer raises an exception that stops polling); URL-encode the command key; keep the pump IP out ofERRORlogs (moved toDEBUG). - coordinator: adjusting a local
number(setpoint, dead band, steps, RPM, interval, timeout) no longer reloads the whole integration — cumulated energy and uptime are no longer reset. The update listener compares connection settings (host / switch / grid entity) instead of a flag: race-free, and applies options-flow edits live. - Enforced invariants:
rpm_min_solar ≤ rpm_max_solaranddead_band_lower ≤ dead_band_upper(auto-clamped in the setters). RunningStatusnormalized viastr()(works whether the pump returns"1"or1).- Options flow: tolerates a
Noneswitch/grid entity;grid_power_entityfalls back toentry.data. - sensor: a failed energy restore is now logged (
warning) instead of being silently swallowed.
🔧 Refactor & quality
PumpStatusDTO (models.py): a single typed parse of the pump JSON.SolarRegulator+SolarControllerConfig(solar.py): pure, testable proportional controller extracted from the coordinator (SRP).number/sensormigrated toNumberEntityDescription/SensorEntityDescription(DRY).GRID_POWER_STALENESS_SECONDSconstant; IP/hostname validation in the config flow.- Removed
utils.py; coordinator typedDataUpdateCoordinator[PumpStatus].
🛠️ Tooling & project
- Migrated to
uv+ruff:pyproject.toml(PEP 621) replacesPipfile;ruff(lint + format) replacesblack+isort;pytestconfig inpyproject;uv.lockcommitted. (Dev/CI tooling only — no impact on the Home Assistant runtime.) - GitHub Actions CI:
ruff check+ruff format --check+pytest(viauv), in addition tohassfestand HACS validation. - License: PolyForm Noncommercial 1.0.0 (personal / non-commercial use).
✅ Tests
- 43 pytest tests: API errors, solar P-controller, energy/uptime, reconfigure, RPM & dead-band invariants, options apply / connection-change, configurable timeout.
Pipfileremoved in favor ofpyproject.toml.
Full changelog: CHANGELOG.md