Skip to content

Commit

Permalink
Version 0.4.12
Browse files Browse the repository at this point in the history
  • Loading branch information
sbidy committed Oct 22, 2021
1 parent e0c92da commit e14b448
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pywizlight/_version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"""PyPi Version."""
__version__ = "0.4.11"
__version__ = "0.4.12"
10 changes: 6 additions & 4 deletions pywizlight/bulb.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down
2 changes: 2 additions & 0 deletions pywizlight/rgbcw.py
Original file line number Diff line number Diff line change
Expand Up @@ -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-
Expand Down

0 comments on commit e14b448

Please sign in to comment.