Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove sync interface, add asyncio discovery #14

Merged
merged 9 commits into from
Jan 12, 2020

Conversation

rytilahti
Copy link
Member

@rytilahti rytilahti commented Jan 12, 2020

* Use asyncio.DatagramProtocol
* Cleanup parameters, no more positional arguments

Closes python-kasa#7
* This requires python-kasa#13 to be merged. Closes python-kasa#12.
* Converts cli to use asyncio.run() where needed.
* The children from smartstrips is being initialized during the first update call.
* Simplify tests and use pytest-asyncio.
* Removed the emeter tests for child devices, as this information do not seem to exist (based on the dummy sysinfo data). Can be added again if needed.
* Remove sync from docstrings.
@rytilahti
Copy link
Member Author

This PR makes the tests pass again (some parts of the strip support was not implemented completely, and some users, e.g., homeassistant simply went and hacked around the internals to make it work), some details in the commit messages 🎉

kasa/discover.py Outdated Show resolved Hide resolved
@basnijholt
Copy link
Contributor

Great work!

I didn't know about pytest.mark.asyncio. Nice work!

Unfortunately, I don't have the devices to test it (except an HS110).

Other than that one comment, LGTM.

@rytilahti
Copy link
Member Author

Same applies to me (i.e., only HS110 here, too :-) I'm hoping to pick up some testers soon enough, I'm still porting homeassistant integration at the moment.

@rytilahti rytilahti changed the title Remove sync interface Remove sync interface, add asyncio discovery Jan 12, 2020
@rytilahti rytilahti merged commit 524d28a into python-kasa:master Jan 12, 2020
@rytilahti rytilahti deleted the remove_sync_interface branch January 12, 2020 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove sync interface wrapper
2 participants