Skip to content

Fix duplicated device name in entity IDs - #10

Merged
ColinSummers merged 1 commit into
mainfrom
fix/entity-name-duplication
Jul 22, 2026
Merged

Fix duplicated device name in entity IDs#10
ColinSummers merged 1 commit into
mainfrom
fix/entity-name-duplication

Conversation

@ColinSummers

Copy link
Copy Markdown
Owner

Problem

Entity IDs contained the device name twice (e.g. device_tracker.dad_ssid_dad). The integration manually built full entity names that included the resource name, while also setting device_info.name to the resource name. Modern Home Assistant generates entity IDs by prepending device_info.name to the entity name, so the resource name appeared twice.

Upstream report: schmittx#158, upstream fix: schmittx#159.

Fix

Migrate to the has_entity_name pattern:

  • Set _attr_has_entity_name = True on EeroEntity.
  • Move the network-name prefix and connection-type suffix options into a new _device_name() helper used by device_info, so they apply to the device name instead of every entity name.
  • The name property now returns only entity_description.name (or None when the description has no name, marking the entity as the device's primary entity).
  • Remove the redundant name override in EeroDeviceTrackerEntity — its description has no name, so the tracker becomes the primary entity and uses the device name directly.

Breaking change

Existing entity IDs will change (the duplicated device-name segment goes away). Automations, dashboards, and scripts referencing the old entity IDs will need to be updated after upgrading.

Fixes #6

🤖 Generated with Claude Code

Migrate to has_entity_name pattern so Home Assistant does not
prepend the device name twice when generating entity IDs.
Move network prefix and connection type suffix into device_info.name
and return only the entity description name from the name property.

Fixes #6
@ColinSummers
ColinSummers merged commit 0473ff2 into main Jul 22, 2026
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.

Entity IDs contain duplicated device name due to legacy naming

1 participant