Skip to content

Commit

Permalink
Update entity names and IDs to include device name
Browse files Browse the repository at this point in the history
This will cause entity names and IDs to include the vehicle name, making
it easier to identify and use the entities, especially when having
multiple vehicles. The unique_id does not change.

E.g.

```
entity_description.key = charger_connected
unique_id = TMBXXXXXXXXXXXX_charger_connected
entitiy_id = sensor.skoda_enyaq_charger_connected
name = Skoda Enyaq Charger Connected
```

Reference: https://developers.home-assistant.io/docs/core/entity/#has_entity_name-true-mandatory-for-new-integrations

This will be a somewhat breaking change in that in order to benefit from
the new entitiy names users will need to delete and recreate the
integration.

Fixes #57
  • Loading branch information
dvx76 committed Oct 20, 2024
1 parent 8f6e8c5 commit 73ecd18
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions custom_components/myskoda/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class MySkodaEntity(CoordinatorEntity):

vin: str
coordinator: MySkodaDataUpdateCoordinator
_attr_has_entity_name = True

def __init__(
self,
Expand Down

0 comments on commit 73ecd18

Please sign in to comment.