Revert "Adapt tplink to use has_entity_name" (#85595)

Revert "Adapt tplink to use has_entity_name (#85577)"

This reverts commit ca0fe488ba.
This commit is contained in:
Franck Nijhof 2023-01-10 10:06:58 +01:00 committed by GitHub
parent d40a4aa970
commit bba9ad3243
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 7 deletions

View file

@ -154,7 +154,14 @@ class SmartPlugSensor(CoordinatedTPLinkEntity, SensorEntity):
self._attr_unique_id = (
f"{legacy_device_id(self.device)}_{self.entity_description.key}"
)
self._attr_name = self.entity_description.name
@property
def name(self) -> str:
"""Return the name of the Smart Plug.
Overridden to include the description.
"""
return f"{self.device.alias} {self.entity_description.name}"
@property
def native_value(self) -> float | None: