* Keep connection open and lock to prevent duplicate requests
* option to not update children
* tweaks
* typing
* tweaks
* run tests in the same event loop
* memorize model
* Update kasa/protocol.py
Co-authored-by: Teemu R. <tpr@iki.fi>
* Update kasa/protocol.py
Co-authored-by: Teemu R. <tpr@iki.fi>
* Update kasa/protocol.py
Co-authored-by: Teemu R. <tpr@iki.fi>
* Update kasa/protocol.py
Co-authored-by: Teemu R. <tpr@iki.fi>
* dry
* tweaks
* warn when the event loop gets switched out from under us
* raise on unable to connect multiple times
* fix patch target
* tweaks
* isrot
* reconnect test
* prune
* fix mocking
* fix mocking
* fix test under python 3.7
* fix test under python 3.7
* less patching
* isort
* use mocker to patch
* disable on old python since mocking doesnt work
* avoid disconnect/reconnect cycles
* isort
* Fix hue validation
* Fix latitude_i/longitude_i units
Co-authored-by: Teemu R. <tpr@iki.fi>
* Cleanup discovery & add tests
* discovered_devices_raw is not anymore available, as that can be accessed directly from the device objects
* test most of the discovery code paths
* some minor cleanups to test handling
* update discovery docs
* Move category check to be after the definitions
* skip a couple of tests requiring asyncmock not available on py37
* Remove return_raw usage from cli.discover
* test_cli: provide return values to patched objects to avoid warning about non-awaited calls
* test_cli: restore alias after testing
* smartstrip: remove internal update() calls for turn_{on,off}, set_led
* Make sure power is always a float
* Fix discovery tests
* Make tests runnable on real devices
* Add a note about running tests on a real device
* test_strip: run update against the parent device
* Preliminary support for light strips
* Add color temperature range and cleanup, thanks to @darkoppressor
* Use lightstrip instead of {led,light}strip consistently everywhere
* The cli flag is now --lightstrip
* add apidocs
* Add fixture file for KL430
Signed-off-by: Kevin Wells <darkoppressor@gmail.com>
* Add discovery support, expose effect and length of the strip
* use set_light_state instead of transition_light_state
* Add tests for lightstrip
* add doctests
* Add KL430 to supported devices in README
Co-authored-by: Kevin Wells <darkoppressor@gmail.com>
* Add doctests to SmartBulb
* Add SmartDevice doctests, cleanup README.md
* add doctests for smartplug and smartstrip
* add discover doctests
* Fix bulb mock
* add smartdimmer doctests
* add sphinx-generated docs, cleanup readme a bit
* remove sphinx-click as it does not work with asyncclick
* in preparation for rtd hooking, move doc deps to be separate from dev deps
* pytestmark needs to be applied separately for each and every file, this fixes the tests
* use pathlib for resolving relative paths
* Skip discovery doctest on python3.7
The code is just fine, but some reason the mocking behaves differently between 3.7 and 3.8.
The latter seems to accept a discrete object for asyncio.run where the former expects a coroutine..
* discover dimmers properly
* fix circular import, hopefully
* add is_color to SmartDevice API
* allow changing the dimming without implicitly turning the device on
* Add tests for device type handling for discovery data, make sure new fixtures are added to categories inside conftest