Releases: Selectra-Dev/selectra-ha
v1.1.5 - Fix critical API spam bug
Critical bug fix
This release fixes a critical issue where the integration could spam the Selectra API with hundreds of retries when the API was rate-limited (429) or temporarily down (503). One reported case showed 1392 retries in 7 hours.
If you experienced repeated "Failed to fetch initial details" warnings in your Home Assistant logs, please update to v1.1.5.
What changed
Fixed
- Integration no longer spams the API in a tight loop on 429/503 responses. Setup errors now propagate properly through Home Assistant's native retry mechanism with exponential backoff.
Changed
- Aligned error handling with Home Assistant 2025.12+ patterns. 5xx and 429 responses now use
UpdateFailed(retry_after=...)so HA schedules the next attempt correctly. - HTTP 5xx responses are detected before parsing JSON, preventing crashes when the API returns an HTML error page.
- Minimum Home Assistant version is now 2025.12.0 (required for the new retry mechanism).
- Auth, rate-limit and server-error logs moved to debug level to avoid duplicating HA's native logging.
- "No price data available for today" log moved to debug to prevent log spam.
Internal
- Replaced custom
async_setup()with the official_async_setup()hook ofDataUpdateCoordinator. - Removed manual exponential backoff in favor of the native
retry_aftermechanism. - New
SelectraServerErrorexception for 5xx responses, distinct from application errors. Retry-Afterheader parsing now supports both integer seconds and HTTP-date formats (RFC 9110).
Requirements
Home Assistant 2025.12.0 or later.
Thanks
Thanks to "bastgau" for the detailed report on the HACF forum that led to this fix.
v1.1.4 - Fix missing state_class on price sensor
Fixed: sensor.prix_actuel was missing state_class after v1.1.3, causing HA to stop tracking long-term statistics.
If you see the warning "L'entité n'a plus de classe d'état", update to v1.1.4 via HACS and click "Fermer" (not "Supprimer") to keep your existing stats.
v1.1.3 - Fix coordinator freezing between API polls
What's fixed
- Coordinator no longer freezes between API polls: Added local timer for HP/HC transitions. The integration now updates prices and period states in real-time without waiting for the next API poll (which can be up to 30 days for fixed-price offers).
- Custom off-peak hours now work: Fixed a bug where manually entered off-peak hours were not sent to the API.
- API token is now masked in the configuration flow.
- Sensor metadata fixed: Removed incorrect device_class and state_class on the price sensor for better HA compliance.
- Proper HA lifecycle: Added async_shutdown() cleanup and config_entry integration for stability.
- Code cleanup: Removed dead code, unused imports and constants.
Upgrade notes
- No reconfiguration needed. Existing settings are migrated automatically.
- Just update via HACS and restart Home Assistant.
v1.1.2
Fixes
- Tempo: period names now display readable labels instead of raw API keys
- Tempo: is_active flag now correctly matches selected periods
- 429 Too Many Requests: proper error message instead of generic "cannot connect"
- Backoff on API errors: exponential retry delay instead of fixed 15min loop
Important
After updating via HACS, a simple Home Assistant restart is enough. No need to remove and re-add the integration.
v1.1.1
Fixes
- Custom off-peak hours: proper TimeSelector UI instead of raw text field
- Config flow: cleaned technical labels (off_peak_hours* → readable labels)
- Coordinator: fixed selected_periods key-to-name mapping for backward compatibility
- Updated translations (fr, en) for custom off-peak step
v1.1.0
Selectra for Home Assistant - v1.1.0
First public release of the Selectra integration for Home Assistant.
Features
- Real-time electricity pricing for French energy contracts (Tempo, Base, HP/HC, EJP)
- Spanish market support (PVPC)
- Automatic tariff period detection with sensors and binary sensors
- Config flow setup with API token authentication
- 27 translations (fr, en, es, de, it, pt, nl, pl, sv, da, nb, fi, cs, sk, hu, ro, bg, el, hr, sl, et, lv, lt, uk, ru, ja, zh-Hans)
- Local brand assets (HA 2026.3+)
- GitHub Actions CI (HACS validation + Hassfest)