diff --git a/pywizlight/_version.py b/pywizlight/_version.py index b20a1ba..ce7ba67 100644 --- a/pywizlight/_version.py +++ b/pywizlight/_version.py @@ -1,2 +1,2 @@ """PyPi Version.""" -__version__ = "0.4.11" +__version__ = "0.4.12" diff --git a/pywizlight/bulb.py b/pywizlight/bulb.py index 6ac22e5..146535a 100755 --- a/pywizlight/bulb.py +++ b/pywizlight/bulb.py @@ -110,10 +110,12 @@ def _set_rgb(self, values: tuple): self.pilot_params["b"] = blue else: raise ValueError("Blue is not in range between 0-255.") - # 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 RGB color + 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) def _set_hs_color(self, values: tuple): """Set the HS color state of the bulb.""" diff --git a/pywizlight/rgbcw.py b/pywizlight/rgbcw.py index 5e8998a..85a1240 100644 --- a/pywizlight/rgbcw.py +++ b/pywizlight/rgbcw.py @@ -126,6 +126,8 @@ def trapezoid(hueVec, saturation): # scale back to the pilot color space rgb = vecInt(vecMul(rgb, 255)) cw = int(max(0, cw * CWMAX)) + if cw == 0: + cw = None debug(" RGB OUT: {}, CW: {}".format(rgb, cw)) # the wiz light appears to have 5 different LEDs, r, g, b, warm_white, and cold_white # there appears to be a max power supplied across the 5 LEDs, which explains why all-