Skip to content

v4.5.0 - Session Resilience

Choose a tag to compare

@ergo5 ergo5 released this 26 Feb 13:17

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: EnergaAPI now accepts a create_session_fn callback 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.json version -> 4.5.0

Full Changelog: v4.4.1...v4.5.0