Skip to content

Reload loop: 'syncing entity name to panel name None' causes entity flickering #162

@NickBorgers

Description

@NickBorgers

Bug Description

The integration enters an infinite reload loop that causes entities to flicker between available and unavailable states. The logs show repeated messages:

INFO [custom_components.span_panel.coordinator] Reloading SPAN Panel integration
INFO [custom_components.span_panel.select] First update: syncing entity name to panel name 'None' for select, requesting reload
INFO [custom_components.span_panel.sensors.base] First update: syncing sensor name to panel name 'None', requesting reload
INFO [custom_components.span_panel.sensors.base] First update: syncing energy sensor name to panel name 'None', requesting reload
INFO [custom_components.span_panel.switch] First update: syncing entity name to panel name 'None' for switch, requesting reload
INFO [custom_components.span_panel.coordinator] SPAN Panel integration reload completed successfully

This cycle repeats indefinitely every ~15 seconds (scan interval).

Impact

  • Entities continuously flicker to "unavailable" and back
  • Dashboard displays become unusable
  • Automations depending on these entities may fail

Investigation Notes

  1. Network connectivity is fine - API calls complete successfully in ~0.3-2s
  2. migration_mode: false did not fix the issue - the name syncing logic appears to be separate from migration
  3. Panel name is None - The integration is trying to sync entity names with a panel name that is None, which triggers the reload request
  4. Debug logs show successful updates followed immediately by reload requests:
    DEBUG [custom_components.span_panel.span_panel] Panel update completed successfully
    INFO [custom_components.span_panel.coordinator] SPAN Panel update cycle completed - Total: 0.959s
    INFO [custom_components.span_panel.coordinator] Reloading SPAN Panel integration
    

Environment

Configuration

Both panels have:

  • migration_mode: false (changed from true, no effect)
  • use_device_prefix: true
  • scan_interval: 15

Expected Behavior

The integration should not enter a reload loop when the panel name is None or unset. The name syncing logic should either:

  1. Skip syncing if the panel name is None
  2. Use a sensible default name
  3. Not trigger a reload for this condition

Related

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions