Repository navigation
Wait for the panel to load instead of falling back to entity discovery - #46
Merged
Merged
Conversation
… to entity discovery The card built a topology from the registries whenever panel_topology failed. With the card shipped only inside the integration, and 2.3.3 answering panel_topology for every user, that fallback ran only while Home Assistant was starting, while a panel was in setup retry, or after a lost connection. In those cases it failed too and left "Unable to connect" until Retry. The card now waits for the panel's entry to load in those cases, and any other failure stays until Retry or a config change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The dashboard card no longer builds a topology from the device and entity registries when
panel_topologyfails. While the integration is still loading the panel, the card says it is waiting and asks again once the panel's config entry has loaded.Why
panel_topologyanswers every logged-in user. The reasons the fallback existed are gone.control_accessor ratings, and later refreshes kept to it.Changes
panel_topologyrefused withnot_loaded,no_dataorunknown_command, or a lost connection, is not retried. The card shows "Waiting for SPAN Panel to load..." and asks again when the panel's entry reachesloaded(config_entries/subscribe, whose first batch and each reconnect's re-seed report an entry already loaded).panel_topology. The fallback-only code, types and thecard.panel_size_errorstring are removed, andDiscoveryResult.topologyis no longer nullable.home-assistant-js-websocket9.8.0, which the frontend of every supported Home Assistant (2026.11.0 and later) pins.Changelog (0.12.1, Fixed)
Tests
tests/span-panel-card-entry-wait.test.ts: waiting on each refusal that waits, asking again on the entry's load and on a re-seed, the owning entry versus any entry for a device id from before 2026.8, a final failure across hass updates and re-attach, Retry, detach andsetConfigduring a wait, and a failure landing while an ask is in flight.isTopologyPendingtable and theRetryManagerpass-through intests/card-discovery.test.tsandtests/retry-manager.test.ts.npm test: 1696 passed. Lint, typecheck and i18n validation are clean.dist/is rebuilt in its own commits. The branch sets the version to 0.12.1-beta.1, released as the pre-release v0.12.1-beta.1 from 244e937, which SpanPanel/span#384 bundles for the integration's beta.