|
@@ -55,7 +55,10 @@ class TuyaLocalEntity:
|
|
|
@property
|
|
@property
|
|
|
def use_device_name(self):
|
|
def use_device_name(self):
|
|
|
"""Return whether to use the device name for the entity name"""
|
|
"""Return whether to use the device name for the entity name"""
|
|
|
- own_name = self._config.name or self._config.translation_key
|
|
|
|
|
|
|
+ alt_name = self._config.translation_key
|
|
|
|
|
+ if self._config.translation_key is self._config.device_class:
|
|
|
|
|
+ alt_name = None
|
|
|
|
|
+ own_name = self._config.name or alt_name
|
|
|
return not own_name
|
|
return not own_name
|
|
|
|
|
|
|
|
@property
|
|
@property
|