Skip to content

Commit

Permalink
Fix again
Browse files Browse the repository at this point in the history
  • Loading branch information
sbidy committed Oct 22, 2021
1 parent 88ef7eb commit 2e29a93
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions pywizlight/bulb.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down

0 comments on commit 2e29a93

Please sign in to comment.