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

BLE Pairing can fail due to race #302

Open
bdraco opened this issue Jul 19, 2023 · 0 comments
Open

BLE Pairing can fail due to race #302

bdraco opened this issue Jul 19, 2023 · 0 comments

Comments

@bdraco
Copy link
Collaborator

bdraco commented Jul 19, 2023

2023-07-19 13:21:23.308 ERROR (MainThread) [homeassistant.components.homekit_controller.config_flow] Pairing attempt failed with an unhandled exception
Traceback (most recent call last):
  File "/Users/bdraco/home-assistant/homeassistant/components/homekit_controller/config_flow.py", line 454, in async_step_pair
    return await self._entry_from_accessory(pairing)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/bdraco/home-assistant/homeassistant/components/homekit_controller/config_flow.py", line 582, in _entry_from_accessory
    name = await pairing.get_primary_name()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/bdraco/home-assistant/venv/lib/python3.11/site-packages/aiohomekit/controller/ble/pairing.py", line 967, in get_primary_name
    return await super().get_primary_name()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/bdraco/home-assistant/venv/lib/python3.11/site-packages/aiohomekit/controller/abstract.py", line 269, in get_primary_name
    accessory_info = parsed.aid(1).services.first(
                     ^^^^^^^^^^^^^
  File "/Users/bdraco/home-assistant/venv/lib/python3.11/site-packages/aiohomekit/model/__init__.py", line 367, in aid
    return self._aid_to_accessory[aid]
           ~~~~~~~~~~~~~~~~~~~~~~^^^^^
KeyError: 1

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

No branches or pull requests

1 participant