Fix entity ID duplication by migrating to has_entity_name - #159
Open
billda wants to merge 1 commit into
Open
Conversation
This was referenced Jul 20, 2026
Closed
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.
Summary
This fixes duplicated entity IDs caused by the integration using a legacy entity naming pattern that no longer matches current Home Assistant behavior.
For clients and other non-network resources, the integration was including the resource name in both
device_info.nameand the entityname. Home Assistant then prepended the device name again when generating the entity ID, which produced IDs such asdevice_tracker.dad_ssid_dad.Root Cause
Current versions of Home Assistant generate entity IDs for device-backed entities using the device name plus the entity name.
This integration was still building full entity names manually:
device_info.namewas set toself.resource.nameEeroEntity.namealso includedself.resource.namehas_entity_name = Truewas not setThat caused the resource/device label to appear twice in the generated entity ID.
Fix
This change migrates
EeroEntityto Home Assistant'shas_entity_namepattern:_attr_has_entity_name = Truedevice_info.namenameto return only the entity-level descriptor from the entity descriptionNonewhen the entity description has no name defined, so primary entities use just the device namedevice_trackerentity name override so tracker IDs now inherit the corrected base behaviorThis preserves the existing
prefix_network_nameandsuffix_connection_typeoptions while preventing resource-name duplication in entity IDs.Expected Behavior After This Change
For a client named
dadon a network namedssid:With
prefix_network_name = true:device_tracker.ssid_dadbinary_sensor.ssid_dad_connectedsensor.ssid_dad_download_rateWith
prefix_network_name = false:device_tracker.dadbinary_sensor.dad_connectedsensor.dad_download_rateBreaking Change
This changes generated entity IDs for newly created entities.
Users will need to update automations, dashboards, and scripts that reference the old entity IDs. The safest recovery path is to delete and re-add the integration so Home Assistant rebuilds the device and entity registry entries using the corrected naming behavior.
Validation
EeroEntitynaming branches for clients, eeros, profiles, backup networks, and networksdevice_trackerdescription still has no explicit entity name, so it correctly falls back to the device name onlyunique_id, config flow options, or API modelspython3 -m py_compile custom_components/eero/__init__.py custom_components/eero/device_tracker.pyFixes #158.