mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-10-21 06:48:05 +00:00
* Change valid hue range to 0-359 (fixes #130) Tested on LB130(EU) hardware 1.0, firmware 1.8.6 Build 180809 Rel.091659 Co-Authored-By: nkonopinski <nkonopinski@users.noreply.github.com> * Update README.md * Update test_bulb.py
This commit is contained in:
@@ -142,10 +142,10 @@ class SmartBulb(SmartDevice):
|
||||
if not self.is_color:
|
||||
return None
|
||||
|
||||
if not isinstance(state[0], int) or not (0 <= state[0] <= 255):
|
||||
if not isinstance(state[0], int) or not (0 <= state[0] <= 359):
|
||||
raise SmartDeviceException(
|
||||
'Invalid hue value: {} '
|
||||
'(valid range: 0-255)'.format(state[0]))
|
||||
'(valid range: 0-359)'.format(state[0]))
|
||||
|
||||
if not isinstance(state[1], int) or not (0 <= state[1] <= 100):
|
||||
raise SmartDeviceException(
|
||||
|
Reference in New Issue
Block a user