Releases: CaputoDavide93/Mixergy-HA
Releases · CaputoDavide93/Mixergy-HA
Release list
v1.3.1 — Hardening (dual-AI adversarial review)
Hardening release from a dual-AI (Claude + Codex) adversarial review focused on HA-core compatibility and robustness. Also fixes the weekly hassfest failure.
Fixed
- Cost sensor state class —
MONETARYdevice class only permitsTOTAL; wasTOTAL_INCREASING, which HA core rejects for long-term statistics. - Stale-poll accumulator poisoning — the energy and cost accumulator sensors kept integrating power across failed coordinator polls, manufacturing phantom kWh from stale readings. They now skip integration and resync their clock while the poll is failing.
- API URL guards — 10
assert <url> is not Nonesites inapi.pyreplaced with a typed_require_url()raisingMixergyConnectionError;AssertionErrorescaped the error taxonomy and disappears underpython -O. - Options flow cross-field validation —
no_water_thresholdcan no longer be set at or abovelow_water_threshold; the form re-shows with a translated error (en/de/fr/it). - services.yaml schema drift — removed
area: {}anddevice:filters from servicetarget:blocks; hassfest now only acceptsentity:filters.
Added
- 4 regression tests covering the fixes above (76 total).
🤖 Generated with Claude Code
v1.3.0 — Water heater, new entities & flows
Feature release: a native water-heater entity plus several new entities and
flows, driven by a dual-AI (Claude + Codex) review for both bugs and features.
Added
- Water heater entity — the tank now appears as a first-class HA
water_heater: current/target temperature, heat-source operation modes
(electric / gas / heat pump), and an away (holiday) toggle. Advanced mode. - Holiday datetime entities — set holiday start/end from a UI picker
(in addition to the services). Advanced mode. - Reconfigure flow — update account credentials from the integration's
Reconfigure button without removing and re-adding the entry. - Multi-tank picker — the config flow now lists the tanks on your account
to choose from instead of typing the serial (manual entry still allowed). - Repair issues — a "tank not found" repair card guides you to reconfigure,
and clears automatically once the tank is reachable again. - Device triggers — automate on "hot water low", "heating started/stopped",
and "holiday started/ended" directly from the Automations UI. - Configurable alert thresholds — set the low / no hot water percentages in
the integration options. - Optional electricity cost sensor — set a price per kWh in options to get a
running electric-heating cost in your currency. quality_scale.yamlchecklist tracking Bronze→Platinum rule status.
Changed
- Entity write commands (switches, numbers, select, button, water heater) now
trigger HA's re-auth flow on an auth failure, consistent with the services. - Experience-mode selector labels are translatable.
- Diagnostics now include (non-secret) options and coordinator metadata.
PARALLEL_UPDATESdeclared on every platform (0 for read, 1 for write).- Device info now includes the serial number and a configuration URL.
Fixed
- API numeric fields are coerced to finite floats; null/NaN/inf/garbage values
no longer mislead entities or the energy/cost integrators. - Options help text corrected to the real 30–300 s poll-interval range.
electric_powerreports a float when idle (was an int0).- Services expose an area target in the UI (the backend already resolved it).
v1.2.0 — Hardening + per-tank service targeting
Hardening and security pass across the API client, coordinator, and services,
plus per-tank service targeting. Driven by a dual-AI (Claude + Codex) review.
Added
- Per-tank service targeting.
set_holiday_dates,clear_holiday_dates,
andboost_chargenow accept a standard Home Assistant target
(entity / device / area), so you can act on a specific tank in a multi-tank
home. A legacyserial_numberfield is also accepted. With no target, the
service still applies to every configured tank. - Per-target authorization. Service calls are permission-checked per tank:
a non-admin user must hold control permission on the targeted tank(s).
System/automation calls and admins are unaffected. - Options take effect immediately. Changing the poll interval or experience
mode now reloads the entry automatically (previously required a manual
reload). - Regression test suite expanded (error boundaries, HATEOAS link validation,
energy non-finite guard, targeting, authorization, fail-closed schema).
Changed
- Re-authentication now triggers correctly when the cloud API rejects the token
during polling or HATEOAS discovery (previously surfaced as a generic
connection error and never opened the reauth flow). - Holiday
start_date/end_datewithout a timezone are now interpreted in
Home Assistant local time instead of UTC. - Experience-mode default is consistent (Simple) across setup, options, and
runtime; entries created before the option existed are migrated to Advanced
on upgrade so no controls silently disappear.
Fixed
- Network errors (DNS, TLS, connection reset, timeout) on API requests are now
normalised to the integration's error types instead of escaping as untyped
tracebacks. - HATEOAS links from the cloud API are validated to be HTTPS on the Mixergy
origin before the bearer token is sent, preventing token leakage over
plaintext or to an unexpected host. - Token / TTL values from the auth response are validated and clamped, avoiding
crashes and login storms on malformed responses. - Malformed JSON, unexpected content types, and null fields in the
measurement / settings / schedule responses are handled gracefully. - An infinite or non-numeric power reading can no longer poison the persisted
cumulative energy total.
Security
- Bearer token is never sent over non-HTTPS or off-origin URLs (HATEOAS link
validation). - Domain services are permission-checked per targeted tank rather than only
per domain.
v1.1.0 — Robustness, i18n, Tests & HACS Readiness
What's changed
Bug fixes & robustness
- API timeout — all
aiohttpcalls now have a 30-second timeout; the integration can no longer hang indefinitely if the Mixergy API is unresponsive - HATEOAS link validation — missing API links now raise a clear
MixergyConnectionErrorinstead of an opaqueKeyError - Heat-source format — fixed mismatch between API format (
heatpump) and HA entity format (heat_pump); the default heat source sensor and select now show the correct value
New features
- Last update sensor — a disabled-by-default diagnostic
Timestampsensor shows when data was last successfully refreshed - Named threshold constants —
LOW_HOT_WATER_THRESHOLD(5 %) andNO_HOT_WATER_THRESHOLD(0.5 %) are now named constants - Better error reporting — all service handlers and entity write methods now raise
HomeAssistantError, so the HA UI shows a red error toast on failure instead of silently swallowing errors
Translations
- Added German 🇩🇪, Italian 🇮🇹, and French 🇫🇷 translations
- Updated all locales with the new 3-step config flow and last_update sensor name
Developer experience
- Full
pytesttest suite added (tests/) - GitHub Actions CI: HACS validation, Hassfest, and pytest run on every push/PR
- Structured GitHub Issue templates (bug report + feature request)
manifest.json: addedquality_scale: "bronze", fixed key ordering (Hassfest requirement)READMErewrite: HACS one-click install button, CI badges, experience modes table, complete entity/service reference
Installation
Or update through HACS if you already have the integration installed.
v1.0.0 — Mixergy Integration for Home Assistant
🔥 Initial Release
Features
- Real-time monitoring — charge level, temperatures, power draw, heat source
- Control — target charge, target temperature, cleansing temperature
- PV Diverter — enable/disable and configure PV settings
- Holiday mode — set/clear holiday dates via service call
- Switches — DSR, frost protection, distributed computing, PV divert
- Select — default heat source (electric / indirect / heat pump)
- Binary sensors — heating status, low/no hot water, active heat source indicators
- Diagnostics — full tank data export with credential redaction
Requirements
- Home Assistant 2024.4+
- Mixergy cloud account
Installation
Install via HACS → Custom Repositories, or manually copy custom_components/mixergy into your HA config directory.