-
Notifications
You must be signed in to change notification settings - Fork 590
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
Bluetooth Connection sensor incorrectly assumes connected devices are not paired #2736
Comments
ran a test myself on my Mi Band 7, still shows up as unpaired if we check the |
Hmm, does the I used the following check to determine if the device is paired: |
I decided not to test that originally only because we are getting the first list from Ran a test now and don't see any differences, although I wouldn't expect to only because of the method used to get the list
That was exactly what I used in my testing, but only for |
In
This puzzles me but might be a device-specific issue, or at least not in the scope of this issue. |
Home Assistant Android version: 2022.6.0-full, beta-2534-90a9a27e-full
Android version: 13
Phone model: Pixel 4a
Home Assistant version: not relevant
Last working Home Assistant release (if known): looking at the history of BluetoothUtils, it has always been broken
Description of problem: Discovered while reviewing a PR: paired devices that are connected via GATT will show up both in
connected_paired_devices
andconnected_not_paired_devices
because forconnected_not_paired_devices
it actually isn't checked if the device is paired or not:android/common/src/main/java/io/homeassistant/companion/android/common/bluetooth/BluetoothUtils.kt
Line 34 in 90a9a27
android/common/src/main/java/io/homeassistant/companion/android/common/bluetooth/BluetoothUtils.kt
Lines 39 to 44 in 90a9a27
Traceback (if applicable, to get the logs you may refer to: https://companion.home-assistant.io/docs/troubleshooting/faqs/#android-crash-logs):
Screenshot of problem:
(the device addresses are the same, just blacked out for privacy)
Additional information: After adding debug logging into the app to check the
bondState
of the device, it shows up asBOND_BONDED
in both cases. This makes sense because they share the same hardware address and the developer documentation says that it is: "(...) a thin wrapper for a Bluetooth hardware address".The text was updated successfully, but these errors were encountered: