From 98fee92c8316c35be8275a9539ecdead255fab1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20St=C3=A5hl?= Date: Fri, 16 Oct 2020 11:54:08 +0200 Subject: [PATCH] Return None if no color temp option --- custom_components/localtuya/light.py | 1 + 1 file changed, 1 insertion(+) diff --git a/custom_components/localtuya/light.py b/custom_components/localtuya/light.py index 2740216..4f81744 100644 --- a/custom_components/localtuya/light.py +++ b/custom_components/localtuya/light.py @@ -89,6 +89,7 @@ class LocaltuyaLight(LocalTuyaEntity, LightEntity): """Return the color_temp of the light.""" if self.has_config(CONF_COLOR_TEMP): return int(MAX_MIRED - (((MAX_MIRED - MIN_MIRED) / 255) * self._color_temp)) + return None @property def min_mireds(self):