python-kasa/pyHS100
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
..
tests Fix bug that changed brightness at each HSV update (#124) 2018-09-05 22:44:44 +02:00
__init__.py move SmartDeviceException to SmartDevice, and remove types.py complet… (#95) 2017-10-07 17:41:51 +02:00
cli.py Allow using alias instead of IP address or hostname (#127) 2018-08-30 23:22:23 +03:00
discover.py Add support for DNS host names (#104) 2018-01-17 22:03:19 +01:00
protocol.py Support Unicode strings in encrypt/decrypt (#125) 2018-08-08 16:52:03 +02:00
smartbulb.py Fix bug that changed brightness at each HSV update (#124) 2018-09-05 22:44:44 +02:00
smartdevice.py Fix emeter support for newer HS110 firmwares (#107) 2018-06-16 21:16:35 +02:00
smartplug.py Release 0.3.1 (#121) 2018-06-16 21:31:51 +02:00