This is not annotated as a property, despite not having any args, so needs to be called, otherwise it is always truthy, as it is the function object. Issue #1856
@@ -60,7 +60,7 @@ class TuyaLocalEntity:
own_name = (
self._config.name
or self._config.translation_key
- or (self._default_to_device_class_name and self._config.device_class)
+ or (self._default_to_device_class_name() and self._config.device_class)
)
return not own_name