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

Fixing two runtime issues on current version from pip #62

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tvogel
Copy link

@tvogel tvogel commented Sep 25, 2022

I ran into two issues preventing me to access the device which I could fix as attached. Please take a look!
Best regards and thanks for the great work to make the thermostats accessible!

This fixes an error about

    RuntimeError: Task <Task pending name='Task-8' coro=<Event.wait() running at /usr/lib64/python3.8/asyncio/locks.py:309> cb=[_release_waiter(<Future pendi...8094c9070>()]>)() at /usr/lib64/python3.8/asyncio/tasks.py:429]> got Future <Future pending> attached to a different loop

in await asyncio.wait_for(self._notifyevent.wait(), timeout)
at bleakconnection.py, line 101
The callback now receives a BleakGATTCharacteristic object such that the
integer handle needs to be retrieved from an attribute.
Copy link
Owner

@rytilahti rytilahti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, thanks for the PR and sorry for the delay. Looks like there's another PR (#64) that aims to do similar (or related) changes, I mentioned there that the characteristic handling should be done in a separate PR than the rest. Wrt. Event handling, your proposal looks good to me but I have no device to test it on right now.

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.

None yet

2 participants