Skip to content

How to reauthenticate after token expiry

Problem: Home Assistant shows a warning banner "Re-authentication required" for the Felicity Energy integration, or all Felicity sensors are unavailable and the log contains ConfigEntryAuthFailed.


When does this happen?

Felicity Cloud tokens expire after approximately 30 days. When the token expires, the integration triggers a reauth flow automatically — it never falls back to Demo mode or fabricates stale values.


Steps

  1. Open Settings → Devices & Services.
  2. Find the Felicity Energy integration card that shows the warning.
  3. Click Reconfigure (or follow the banner link "Re-authentication required").
  4. The reauth dialog shows a single field: Felicity Cloud access token.
  5. Obtain a fresh token from the Felicity web app:
  6. Open https://shine.felicitysolar.com and log in.
  7. Open the browser developer tools → Network tab.
  8. Trigger any page load (e.g. refresh the dashboard).
  9. Find any API request to shine-api.felicitysolar.com (e.g. get_energy_flow2).
  10. Copy the full value of the Authorization request header. It starts with Bearer_ (underscore, not space).
  11. Paste the new token into the reauth dialog and confirm.

Home Assistant validates the token with a live API call before saving. If the token is invalid, the dialog stays open with an error message.


After reauth

All sensors resume normal operation within the next polling interval (default 60 s). The integration does not reload its config entry when only the token is updated, so entity state history is preserved.


Preventing frequent reauthentication

Felicity tokens are session tokens from the web app. They expire when:

  • The token reaches its ~30-day lifetime.
  • You log out of shine.felicitysolar.com in the same browser session.
  • Felicity rotates or revokes the token server-side.

There is currently no way to obtain a longer-lived token through the public API. The OAuth2 + PKCE auth mode is designed for integrations that have their own token provider with refresh support; Felicity does not publish such an endpoint publicly.