Skip to content

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.

2 participants