Centralize entity naming for Tuya entities (#57755)

This commit is contained in:
Franck Nijhof 2021-10-15 10:07:25 +02:00 committed by GitHub
parent 8b422a7bd5
commit f6c6ec3578
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 5 additions and 33 deletions

View file

@ -101,13 +101,6 @@ class TuyaSelectEntity(TuyaEntity, SelectEntity):
type_data = EnumTypeData.from_json(self._status_range.values)
self._attr_options = type_data.range
@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 current_option(self) -> str | None:
"""Return the selected entity option to represent the entity state."""