Replace dash with hard hyphen in myuplink entity names (#111074)

Replace dash with hard hyphen in entity names
This commit is contained in:
Åke Strandberg
2024-02-22 12:56:42 +01:00
committed by GitHub
parent b72d64a3dc
commit 58269fefea

View File

@@ -206,7 +206,10 @@ class MyUplinkDevicePointSensor(MyUplinkEntity, SensorEntity):
# Internal properties
self.point_id = device_point.parameter_id
self._attr_name = device_point.parameter_name.replace("\u002d", "")
# Remove soft hyphens and replace dash to hard hyphen
self._attr_name = device_point.parameter_name.replace("\u002d", "").replace(
"-", "\u2011"
)
if entity_description is not None:
self.entity_description = entity_description