Skip to content

Commit

Permalink
Entity naming: _default_to_device_class_name is a function
Browse files Browse the repository at this point in the history
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
  • Loading branch information
make-all committed Dec 29, 2024
1 parent a90781f commit 3ad05af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/tuya_local/helpers/mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def use_device_name(self):
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

Expand Down

0 comments on commit 3ad05af

Please sign in to comment.