From 2e29a9366d33f08d41ce09bc29aee36f739b31d5 Mon Sep 17 00:00:00 2001 From: Stephan Traub Date: Fri, 22 Oct 2021 18:29:46 +0200 Subject: [PATCH] Fix again --- pywizlight/bulb.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pywizlight/bulb.py b/pywizlight/bulb.py index 0b89010..4959a15 100755 --- a/pywizlight/bulb.py +++ b/pywizlight/bulb.py @@ -110,11 +110,13 @@ def _set_rgb(self, values: tuple): self.pilot_params["b"] = blue else: raise ValueError("Blue is not in range between 0-255.") - if cw is not None: - # Use the existing set_warm_white function to set the CW values - self._set_warm_white(cw) - # Use the existing set_cold_white function to set the CW values - self._set_cold_white(cw) + # No CW because of full color + if cw is None: + cw = 0 + # Use the existing set_warm_white function to set the CW values + self._set_warm_white(cw) + # Use the existing set_cold_white function to set the CW values + self._set_cold_white(cw) def _set_hs_color(self, values: tuple): """Set the HS color state of the bulb."""