mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-10-21 14:58:02 +00:00
Updated valid range to 360 (with passing tests) (#153)
* Updated valid range to 360 with it set to 359 it will not show the color red. Just tested this with a buddies bulb - same model/fw https://imgur.com/a/kSNZIuL * Updated valid range to 360 with it set to 359 it will not show the color red. Just tested this with a buddies bulb - same model/fw https://imgur.com/a/kSNZIuL * Update valid range to 360 * Fix tests
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] <= 359):
|
||||
if not isinstance(state[0], int) or not (0 <= state[0] <= 360):
|
||||
raise SmartDeviceException(
|
||||
'Invalid hue value: {} '
|
||||
'(valid range: 0-359)'.format(state[0]))
|
||||
'(valid range: 0-360)'.format(state[0]))
|
||||
|
||||
if not isinstance(state[1], int) or not (0 <= state[1] <= 100):
|
||||
raise SmartDeviceException(
|
||||
|
Reference in New Issue
Block a user