home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.16k stars 29.84k forks source link

Already configured Improv BLE device discovery reappears after HA restart #124833

Open ScottG489 opened 2 weeks ago

ScottG489 commented 2 weeks ago

The problem

An Improv BLE device discovery keeps reappearing after HA restarts. This device is already configured and if I select to configure it it identifies that correctly.

What version of Home Assistant Core has the issue?

2024.8.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

improv_ble

Link to integration documentation on our website

https://www.home-assistant.io/integrations/improv_ble/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

On startup there's this log:

Logger: homeassistant.components.bluetooth.manager
Source: components/bluetooth/manager.py:109
integration: Bluetooth (documentation, issues)
First occurred: 8:21:13 PM (1 occurrences)
Last logged: 8:21:13 PM

Error in bluetooth callback
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/bluetooth/manager.py", line 109, in _discover_service_info
    callback(service_info, BluetoothChange.ADVERTISEMENT)
  File "/usr/src/homeassistant/homeassistant/components/improv_ble/config_flow.py", line 142, in _async_update_ble
    service_info.service_data[SERVICE_DATA_UUID].hex(),
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
KeyError: '00004677-0000-1000-8000-00805f9b34fb'

After selecting "configure":

Logger: homeassistant.components.improv_ble.config_flow
Source: components/improv_ble/config_flow.py:396
integration: improv_ble (documentation, issues)
First occurred: 8:22:48 PM (1 occurrences)
Last logged: 8:22:48 PM

CharacteristicMissing
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/improv_ble/config_flow.py", line 396, in _try_call
    return await func
           ^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/improv_ble_client/client.py", line 184, in can_identify
    return await self._execute(_can_identify)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/bleak_retry_connector/__init__.py", line 505, in _async_wrap_bluetooth_connection_error_retry
    return await func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/improv_ble_client/client.py", line 291, in _execute
    await self._ensure_connected()
  File "/usr/local/lib/python3.12/site-packages/improv_ble_client/client.py", line 337, in _ensure_connected
    self._resolve_characteristics(client.services)
  File "/usr/local/lib/python3.12/site-packages/improv_ble_client/client.py", line 371, in _resolve_characteristics
    raise CharacteristicMissingError(characteristic)
improv_ble_client.errors.CharacteristicMissingError: 00467768-6228-2272-4663-277478268005

Additional information

No response

home-assistant[bot] commented 2 weeks ago

Hey there @emontnemery, mind taking a look at this issue as it has been labeled with an integration (improv_ble) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `improv_ble` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign improv_ble` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


improv_ble documentation improv_ble source (message by IssueLinks)

ScottG489 commented 2 weeks ago

I've attempted to ignore the discovered integration, but after restarting HA I now get this:

Logger: homeassistant.setup
Source: setup.py:269
First occurred: 12:53:22 PM (1 occurrences)
Last logged: 12:53:22 PM

Setup failed for 'improv_ble': No setup or config entry setup function defined.