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 callbacks can error if a device is unpairing because the cache has been deleted #303

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

Comments

@bdraco
Copy link
Collaborator

bdraco commented Jul 19, 2023

2023-07-19 13:31:02.329 DEBUG (MainThread) [aiohomekit.controller.abstract] A133RDP8 [DB:AF:6E:65:E8:41] (id=89:A9:01:69:8C:83): Config number has changed from -1 to 1; char cache invalid
2023-07-19 13:31:02.330 ERROR (MainThread) [homeassistant.components.bluetooth.manager] Error in callback: <bound method BleController._device_detected of <aiohomekit.controller.ble.controller.BleController object at 0x2a6b1c4d0>>
Traceback (most recent call last):
  File "/Users/bdraco/home-assistant/homeassistant/components/bluetooth/manager.py", line 97, in _dispatch_bleak_callback
    callback(device, advertisement_data)
  File "/Users/bdraco/home-assistant/venv/lib/python3.11/site-packages/aiohomekit/controller/ble/controller.py", line 102, in _device_detected
    pairing._async_description_update(data)
  File "/Users/bdraco/home-assistant/venv/lib/python3.11/site-packages/aiohomekit/controller/ble/pairing.py", line 418, in _async_description_update
    self._update_cached_state_num(description.state_num)
  File "/Users/bdraco/home-assistant/venv/lib/python3.11/site-packages/aiohomekit/controller/ble/pairing.py", line 388, in _update_cached_state_num
    old_state_num = self._accessories_state.state_num
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'state_num'

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