From 8e1e349fa40d617f1d6a30e0ec0f083d2e569112 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 17 Dec 2020 13:15:28 +0000 Subject: [PATCH] Fix HA scene, one more. --- custom_components/localtuya/light.py | 4 +++- requirements_test.txt | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/custom_components/localtuya/light.py b/custom_components/localtuya/light.py index b7745e7..a7f9b2d 100644 --- a/custom_components/localtuya/light.py +++ b/custom_components/localtuya/light.py @@ -188,7 +188,9 @@ class LocaltuyaLight(LocalTuyaEntity, LightEntity): """Return the hs color value.""" if self.is_color_mode: return self._hs - if self.supported_features & SUPPORT_COLOR: + if self.supported_features & SUPPORT_COLOR and not self.has_config( + CONF_COLOR_TEMP + ): return [0, 0] return None diff --git a/requirements_test.txt b/requirements_test.txt index ef8a762..7f2bb4c 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -1,6 +1,6 @@ black==20.8b1 codespell==2.0.0 -flake8==3.8.3 +flake8==3.8.4 mypy==0.782 pydocstyle==5.1.1 cryptography==3.2