v1.12.2 - Exception translations (Gold complete)
What changed
The two HomeAssistantError subclasses raised by the coordinator (ConfigEntryAuthFailed and UpdateFailed) now carry translation_domain / translation_key / translation_placeholders so Home Assistant renders a localised message in the user's language, instead of interpolating the raw English exception text from the underlying error.
Two new keys added under exceptions in strings.json + translations/en.json + translations/fr.json:
auth_failed— "Authentication with the portal failed: {error}" / "Échec de l'authentification au portail : {error}". Surfaced when re-auth from the coordinator fails; also forms the body of the reauth notification HA shows in the UI.update_failed— "Failed to fetch consumption data from the portal: {error}" / "Impossible de récupérer les données de consommation depuis le portail : {error}". Surfaced on the integration card when a poll fails for any non-auth reason (transport error, 5xx after retries, etc.).
The {error} placeholder carries the underlying exception message for context — typically already informative since v1.10.1 (DNS clarity) and v1.10.2 (cleaner client construction).
Quality scale
This release closes the last remaining Gold-tier rule (exception-translations). The full Gold tier is now done in quality_scale.yaml apart from the rules marked exempt for legitimate reasons (no discoverable endpoints, no physical devices, etc.).
Only strict-typing (Platinum) remains todo.
Verified
- Full local validation (ruff, mypy strict, pytest)
- All 5 CI jobs green (Lint, Typecheck, Pytest, Hassfest, HACS)
Closes #14.