Skip to content

Show renamed panels and sub-devices by their Home Assistant name - #384

Merged
cayossarian merged 4 commits into
mainfrom
feat/issue-382-device-names
Nov 23, 2026
Merged

cayossarian merged 4 commits into
mainfrom
feat/issue-382-device-names

Conversation

@cayossarian

@cayossarian cayossarian commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

What

span_panel/panel_topology now sends the name Home Assistant shows for the panel (device_name) and for each battery, charger and solar device (name): the user's rename first, else the integration's. Before, it sent each device's registered name, so after a rename in Home Assistant the card and the sidebar dashboard kept the integration's name.

Fixes #382

Changes

  • New device_display_name helper in util.py that carries the rule, used for the panel's device_name and every sub-device's name.
  • Six inline copies of the same rule, in additions.py, circuit_object_ids.py, conversion_repairs.py and websocket_adopted.py, now call the helper. Each keeps its own trailing fallback, so none behaves differently.
  • For the beta: the branch bundles span-card v0.12.1-beta.1, cut from Wait for the panel to load instead of falling back to entity discovery span-card#46, which waits for the panel to load instead of falling back to entity discovery. The bundled span-panel-card.js is byte-identical to that release's asset. The final bundles the card's final release instead.
  • Release: chore: release 2.3.4b1 sets the version in manifest.json, pyproject.toml and uv.lock, and adds the card's fix to the 2.3.4 changelog.

Changelog (2.3.4, Fixed)

  • The SPAN Panel card and the sidebar dashboard now show a panel and each of its battery, charger and solar devices by the name you gave it in Home Assistant, where a renamed device kept the name the integration gave it.
  • A SPAN Panel card opened while Home Assistant is starting or restarting, or while the integration retries a panel it cannot reach, says it is waiting for the panel to load and draws the panel once it has loaded, where it showed "Unable to connect to SPAN Panel" until Retry was pressed or the dashboard was opened again.

Tests

  • test_topology_names_the_panel_as_home_assistant_does and test_topology_names_each_sub_device_as_home_assistant_does, each for a renamed and a not-renamed device, rename through the device registry. The renamed cases fail on the previous code.
  • Full suite: 4635 passed. mypy, ruff and the pre-commit hooks are clean.

…shows them

panel_topology sent each device's registered name, so after a rename in Home
Assistant the card and the sidebar dashboard kept the integration's name. It now
sends the user's name first, through a new device_display_name helper that also
replaces six inline copies of the same rule.

Fixes #382
Built from span-card feat/remove-entity-fallback at 8062e12, for the beta. The
final bundles the released card build instead.
The release build of span-card v0.12.1-beta.1 (244e937); span-panel-card.js is
byte-identical to the release asset.
@cayossarian
cayossarian merged commit 9ff4256 into main Nov 23, 2026
8 checks passed
@cayossarian
cayossarian deleted the feat/issue-382-device-names branch November 23, 2026 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Panel card title ignores the device name set in Home Assistant (panel_topology returns device_entry.name)

1 participant