asyncio.wait_for has some underlying problems that are only fixed in cpython 3.12.
Use async_timeout instead until the minimum supported version is 3.11+ and it can be replaced with asyncio.timeout
See https://github.com/python/cpython/pull/98518
Besides some small improvements, this release:
* Adds optional dependency for for `orjson` and `kasa-crypt` to speed-up protocol handling by an order of magnitude.
* Drops Python 3.7 support as it is no longer maintained.
[Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.5.1...0.5.2)
* commented out modules that break
* added exclusion logic to smartdevice.py
* cleaning up a name
* removing test fixture that isn't related to this PR
* incorporating PR feedback
* fixed an if statement
* reduced exclusion list to just 'cloud'
* Tidy up the issue comment
Co-authored-by: Teemu R. <tpr@iki.fi>
* this seems to be what the linter whats
---------
Co-authored-by: Teemu R. <tpr@iki.fi>
* Drop python 3.7 support
* CI: drop 3.7 and add 3.11
* Remove skipifs that were required for <3.8
* Use pypy-3.8 for CI, re-enable pypy for windows to see if it works now
* Bump readthedocs to use py3.8
* Remove py3.7 failure comment
* Mark mocked fixtures as such
* Use consistent filenames including the swver
* Remove executable bit
* Remove duplicate KL130(US)
* Remove unnecessary mocks where we have real ones available
* Fix filenames in tests
* Make hue, saturation and color_temp optional for smartbulbpresets
* Adjust bulb preset attributes for effect mode
* Don't send None values on save_preset
* Add tests for save_preset payloads
This will make --json to output relevant contents even when no command is defined (i.e., when calling 'kasa --host <host> --json' or 'kasa --target <bcast> --json'.
* Basic fix for issue: https://github.com/python-kasa/python-kasa/issues/373
Change usage module get_daystat and get_monthat to return dictionaries of date index: time values as spec'd instead of raw usage data. Output matches emeter module get_daystat and get_monthstat
* Fixed some formatting and lint warnings to comply with black/flake8
Use the new _convert function in emeter for all conversions rather than the one in smartdevice.py
Removed unused function _emeter_convert_emeter_data from smartdevice.py
* Added a first pass test module for testing the new usage conversion function
* Changes based on PR feedback
Tidied up some doc string comments
Added a check for explicit values from conversion function
* Rebase on top of current master, fix docstrings
---------
Co-authored-by: Teemu Rytilahti <tpr@iki.fi>
* adding cli option to delete rule
* resolving black linting issue
* simplifying command name
Co-authored-by: Teemu R. <tpr@iki.fi>
* updating rule filter
Co-authored-by: Teemu R. <tpr@iki.fi>
* Fix type hinting issue with call to click.Choice which takes a Sequence not dictionary. Convert TYPE_TO_CLASS keys to a list to pass in.
* Update kasa/cli.py
Co-authored-by: Teemu R. <tpr@iki.fi>
Co-authored-by: Jules Davis <jules@focalpointvr.com>
Co-authored-by: Teemu R. <tpr@iki.fi>