python-kasa/pyHS100/tests
Sebastian Templ df0a7f4c36 Fix bug that changed brightness at each HSV update (#124)
* Fix bug that changed brightness at each hsv update

The HSV setter should accept a percentage for the brightness
value but actually assumed the brightness to be in absolute values
between 1 and 255.
This resulted in brightness reductions at each HSV update, in
steps of 100% -> 100/255=39% -> 39/255=15% -> ... (see also
https://github.com/home-assistant/home-assistant/issues/15582,
where I originally reported this bug).

* Modify HSV property to return brightness in percent

Switch from reported brightness values of 1..255 to percentage
values, for consistency with the apidoc and 8761dd8.

* Add checks and tests for the hsv setter

- make sure that new (hue, saturation, brightness) values are
  within their valid ranges (0..255, 0..100, 0..100) and raise
  SmartDeviceException if they are not
- add test function for the hsv setter
2018-09-05 22:44:44 +02:00
..
__init__.py Make tests runnable without device (#24) 2017-01-08 06:45:47 +08:00
fakes.py Fix emeter support for newer HS110 firmwares (#107) 2018-06-16 21:16:35 +02:00
test_bulb.py Fix bug that changed brightness at each HSV update (#124) 2018-09-05 22:44:44 +02:00
test_protocol.py Support Unicode strings in encrypt/decrypt (#125) 2018-08-08 16:52:03 +02:00
test_pyHS100.py Fix emeter support for newer HS110 firmwares (#107) 2018-06-16 21:16:35 +02:00