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:
parent
d40a4aa970
commit
bba9ad3243
4 changed files with 10 additions and 7 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue