From f3950602d200603f0c2bbc9d0945f11c88f6a934 Mon Sep 17 00:00:00 2001 From: Fabrice Devaux Date: Sun, 20 Oct 2024 15:53:41 +0200 Subject: [PATCH] Update entity names and IDs to include device name (#110) 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 --- custom_components/myskoda/entity.py | 1 + 1 file changed, 1 insertion(+) diff --git a/custom_components/myskoda/entity.py b/custom_components/myskoda/entity.py index e00afad..8b35a75 100644 --- a/custom_components/myskoda/entity.py +++ b/custom_components/myskoda/entity.py @@ -15,6 +15,7 @@ class MySkodaEntity(CoordinatorEntity): vin: str coordinator: MySkodaDataUpdateCoordinator + _attr_has_entity_name = True def __init__( self,