Skip to content

fix: keep direct Bluetooth on local BlueZ - #19

Open
Chreece wants to merge 1 commit into
mtheli:mainfrom
Chreece:fix/direct-bluetooth-local-bluez
Open

fix: keep direct Bluetooth on local BlueZ#19
Chreece wants to merge 1 commit into
mtheli:mainfrom
Chreece:fix/direct-bluetooth-local-bluez

Conversation

@Chreece

@Chreece Chreece commented Sep 7, 2026

Copy link
Copy Markdown

What was wrong

When a Philips shaver was visible through both the Home Assistant host Bluetooth adapter and a standard ESPHome Bluetooth proxy, choosing Direct Bluetooth did not guarantee that the host adapter was used. Home Assistant could re-select the stronger proxy when opening the connection.

Philips shavers use LE Secure Connections and their Bluetooth bond belongs to the adapter that paired them. As a result, a shaver could be correctly paired and trusted on hci0, while setup still failed because the actual connection was silently attempted through an ESPHome proxy that cannot complete the required pairing.

There was also a second setup issue: manually selecting the shaver could race with Home Assistant's automatic Bluetooth discovery for the same device and show “Configuration flow is already in progress”, even though the user had intentionally started the setup.

What this fixes

Direct Bluetooth now stays on a local Home Assistant/BlueZ adapter whenever one is available, instead of allowing a stronger standard Bluetooth proxy to take over the connection. Runtime polling follows the same local path.

Manual setup also no longer aborts simply because an automatic discovery flow for the same shaver exists; an actually configured duplicate is still rejected normally.

The behavior was tested with a Philips OneBlade 360 QP4530, paired/bonded/trusted on BlueZ, while standard ESPHome Bluetooth proxies remained online. Before the fix the proxy took over and setup failed; after the fix the device was selected through hci0 and setup completed successfully.

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.

1 participant