From 3ad05af65cf9256c2d00ce990223f0581a1190d8 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sun, 29 Dec 2024 10:30:22 +0900 Subject: [PATCH] Entity naming: _default_to_device_class_name is a function 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 --- custom_components/tuya_local/helpers/mixin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/tuya_local/helpers/mixin.py b/custom_components/tuya_local/helpers/mixin.py index 511e6835ec..6f8534e55a 100644 --- a/custom_components/tuya_local/helpers/mixin.py +++ b/custom_components/tuya_local/helpers/mixin.py @@ -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