Skip to content

Connection Issues

Problems connecting Hanergy to Home Assistant, or entity values not appearing correctly.


“HA Connection: Disconnected” on the Dashboard

Section titled ““HA Connection: Disconnected” on the Dashboard”

The dashboard shows the connection status to Home Assistant. If it reads “Disconnected”, work through the following:

For HA add-on installations, the add-on manifest must include homeassistant_api: true. Without this, the Supervisor does not inject the authentication token into the container, and Hanergy cannot connect to Home Assistant.

Go to Settings > Add-ons > Hanergy > Log. Look for messages from the WebSocket manager. A failed initial connection logs the error and begins retrying.

Hanergy reconnects automatically with exponential backoff:

  • First retry: 1 second
  • Subsequent retries: doubling each time, capping at 30 seconds

A brief “Disconnected” indicator after a Home Assistant restart is normal and self-resolves within seconds.

For standalone Docker deployments, verify the environment variables:

  • HA_URL must be the full URL to your Home Assistant instance (e.g., http://192.168.1.100:8123)
  • HA_TOKEN must be a valid Long-Lived Access Token (create one in your HA profile page)

Entity state is populated by the WebSocket subscription to Home Assistant. Until at least one state-change event arrives for an entity, its cached value is zero.

Checklist:

  • Verify entity IDs match exactly. Go to Settings > Energy Entities in Hanergy and compare each entity ID with what Home Assistant reports. Entity IDs are case-sensitive.
  • Confirm entities exist in HA. Open HA Developer Tools > States and search for each entity ID. If the entity does not appear, the sensor integration may not be loaded.
  • Wait one evaluation cycle. After a fresh start, allow at least one evaluation cycle (default: 10 seconds) for the cache to populate from incoming state events.
  • Check for “unavailable” state. If an entity exists in HA but reports unavailable, the underlying device or integration has lost contact. Resolve the issue in HA first.

The WebSocket connection between Hanergy and Home Assistant may drop temporarily due to:

  • Home Assistant restarting
  • Network interruption
  • Supervisor maintenance

Hanergy handles this automatically. During a disconnection:

  • The engine pauses evaluation (no decisions are made with stale data).
  • The WebSocket manager retries with exponential backoff.
  • Once reconnected, entity states are refreshed and the engine resumes.

No user action is required. If the connection does not recover within a few minutes, check that Home Assistant itself is running and accessible.