-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Asyncio conversion #723
Asyncio conversion #723
Conversation
Add aiohttp requirement
fix missing awaits
Codecov Report
@@ Coverage Diff @@
## dev #723 +/- ##
===========================================
+ Coverage 83.15% 99.64% +16.48%
===========================================
Files 8 8
Lines 1413 1396 -17
===========================================
+ Hits 1175 1391 +216
+ Misses 238 5 -233
Flags with carried forward coverage won't be shown. Click here to find out more.
|
100% on board with this. And a huge huge thanks for working on it. It's something I've always wanted to add to the library but gave up due to lack of time. Hopefully I'll be able to start looking at the changes a bit this weekend 🤞 |
Since you agree with the concept, I'm going to keep pecking away at the tests. I've been finding a few coding errors as create I them (Usually missing an |
add missing awaits
Removed unreachable code from sync
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall the changes looks pretty easy to understand. There's a few questions I have related to my lack of understanding about how async works. Ultimately this is a pretty big shift so my plan will be to pull your changes down locally just so I can do some spot checking of functionality on my end, and then probably do an rc
release for more wide-spread testing and stuff.
revert from .items()
missing await
Found a couple of mistakes in the image formatting while testing the HA integration. |
After 3 weeks of running as a custom component, It looks like moving to asyncIO version fixes the partial picture download that was reported here: home-assistant/core#91227. |
Awesome! Exactly what would be expected, so glad to hear that. Real life got in the way a bit so I haven't been able to test on my end, but I should be able to run some tests this week as a sanity check and then merge 🤞 |
Found the wrapper was removing |
In the process of trying to figure out why things are so slow to update, I discovered we need a data coordinator. I've created a second branch in the repo with said data coordinator - please try that one out too... |
How's the review going? |
I have tested very little, to be honest. Life and work have been hectic, unfortunately. You've been running this for awhile now, though, right? If you think it's good to go, I'll merge it. |
It has been running flawlessly for me, BUT I only have doorbells on a sync module. I have no way to verify any other combinations IRL. If the added tests are any good, everything "should" work, but it wouldn't hurt to try some other combinations. If not, let her fly with a PyPi release and I'll see if we can get the HA integration update through. If something is broken we can fix it on the fly :) I've also added a user friendly wxPython based blinksync.py which can be used to download/delete files from a sync module via a selection dialog. For now it only uses the first system found. |
Just made a pre-release to pypi: Not a valid release to push to home-assistant, but at least allows testing where the version can just be updated once the release is pushed to the master branch. |
Thoughts on when we will be ready for a full release? (I'll keep quiet till then :) ) |
Description:
Convert the API to utilize aiohttp and asyncIO
I've spent some time converting to asyncIO - this is the first step toward updating the HA integration to asyncIO, and eventually if we figure out the subscription end points, will allow for event base updates.
It's a big change... so it will probably take some time to get through the proposed changes (assuming you agree with this direction).
Related issue (if applicable): fixes #
Checklist:
tox
run successfully PR cannot be meged unless tests pass