Skip to content

Commit a390db6

Browse files
author
marq24
committed
use 'user-specified' entify name if present (from registry_entry)
1 parent 605e1fd commit a390db6

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

custom_components/goecharger_api2/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -727,6 +727,11 @@ def _friendly_name_internal(self) -> str | None:
727727
if name is None and self.use_device_name:
728728
return device_name
729729

730+
# check if there is a user specified entity name (overwritten)
731+
if registry_entry := self.registry_entry:
732+
if registry_entry.has_entity_name and registry_entry.name is not None:
733+
name = registry_entry.name
734+
730735
# we overwrite the default impl here and just return our 'name'
731736
# return f"{device_name} {name}" if device_name else name
732737
if device_entry.name_by_user is not None:

custom_components/goecharger_api2/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212
"iot_class": "local_push",
1313
"issue_tracker": "https://github.com/marq24/ha-goecharger-api2/issues",
1414
"requirements": ["packaging>=21.0", "msgpack>=1.1.2", "bcrypt>=5.0.0"],
15-
"version": "2026.3.4"
15+
"version": "2026.3.5"
1616
}

0 commit comments

Comments
 (0)