Repository navigation
Show renamed panels and sub-devices by their Home Assistant name - #384
Merged
Merged
Conversation
…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.
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
span_panel/panel_topologynow 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 registeredname, so after a rename in Home Assistant the card and the sidebar dashboard kept the integration's name.Fixes #382
Changes
device_display_namehelper inutil.pythat carries the rule, used for the panel'sdevice_nameand every sub-device'sname.additions.py,circuit_object_ids.py,conversion_repairs.pyandwebsocket_adopted.py, now call the helper. Each keeps its own trailing fallback, so none behaves differently.span-panel-card.jsis byte-identical to that release's asset. The final bundles the card's final release instead.chore: release 2.3.4b1sets the version inmanifest.json,pyproject.tomlanduv.lock, and adds the card's fix to the 2.3.4 changelog.Changelog (2.3.4, Fixed)
Tests
test_topology_names_the_panel_as_home_assistant_doesandtest_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.