Centralize entity naming for Tuya entities (#57755)
This commit is contained in:
parent
8b422a7bd5
commit
f6c6ec3578
6 changed files with 5 additions and 33 deletions
|
@ -149,13 +149,6 @@ class TuyaSensorEntity(TuyaEntity, SensorEntity):
|
|||
elif self._status_range.type == "Enum":
|
||||
self._type_data = EnumTypeData.from_json(self._status_range.values)
|
||||
|
||||
@property
|
||||
def name(self) -> str | None:
|
||||
"""Return Tuya device name."""
|
||||
if self.entity_description.name is not None:
|
||||
return f"{self.tuya_device.name} {self.entity_description.name}"
|
||||
return self.tuya_device.name
|
||||
|
||||
@property
|
||||
def native_value(self) -> StateType:
|
||||
"""Return the value reported by the sensor."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue