v4.5.0 - Session Resilience
What's Changed
Session Resilience (Fixes #13)
The integration now automatically recovers from closed/expired HTTP sessions:
- Auto-recovery in
_api_get(): If the aiohttp session is closed or returns HTTP 401/403, the API layer automatically creates a new session, re-logs in, and retries the request (max 1 retry) - Session factory:
EnergaAPInow accepts acreate_session_fncallback for session recreation - Sequential meter processing: history import now processes meters sequentially instead of in parallel, preventing race conditions on the shared session
Tested
- Login + data fetch: PASS
- Session close + auto-recovery: PASS
- 3 sequential day fetches after recovery: PASS
- Double session close + recovery: PASS
Version
manifest.jsonversion ->4.5.0
Full Changelog: v4.4.1...v4.5.0