Skip to content

Commit

Permalink
Fix warm and cold white vaule limitation
Browse files Browse the repository at this point in the history
  • Loading branch information
sbidy committed Dec 16, 2021
1 parent bb6b5bc commit d6007c3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pywizlight/bulb.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,17 @@ def set_state_message(self, state: bool) -> str:

def _set_warm_white(self, value: int) -> None:
"""Set the value of the warm white led."""
if 0 < value < 256:
if 0 <= value < 256:
self.pilot_params["w"] = value
else:
raise ValueError("Value must be between 1 and 255")
raise ValueError("Value must be between 0 and 255")

def _set_cold_white(self, value: int) -> None:
"""Set the value of the cold white led."""
if 0 < value < 256:
if 0 <= value < 256:
self.pilot_params["c"] = value
else:
raise ValueError("Value must be between 1 and 255")
raise ValueError("Value must be between 0 and 255")

def _set_speed(self, value: int) -> None:
"""Set the color changing speed in precent (0-100)."""
Expand Down

0 comments on commit d6007c3

Please sign in to comment.