Skip to content

Commit

Permalink
Merge pull request #7 from skitterrusty/patch-1
Browse files Browse the repository at this point in the history
Fix color temp normalization
  • Loading branch information
sbidy authored Oct 1, 2020
2 parents 676195a + fd38f61 commit b7991b2
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 @@ -91,10 +91,10 @@ def _set_brightness(self, value: int):
def _set_colortemp(self, kelvin: int):
"""Set the color temperature for the white led in the bulb."""
# normalize the kelvin values - should be removed
if kelvin < 2500:
kelvin = 2500
if kelvin > 6500:
kelvin = 6500
if kelvin < 1000:
kelvin = 1000
if kelvin > 10000:
kelvin = 10000

self.pilot_params["temp"] = kelvin

Expand Down

0 comments on commit b7991b2

Please sign in to comment.