Bluetooth Info such as Battery/Volume/Other

I just wrote an answer on a GitHub issue under the Android Repo (https://github.com/home-assistant/android/issues/556) but I realized that is probably not the right place for it so I moved most of it here. This idea should probably be taken broader. Lets drop it in this forum too and see what people think of it.

I’ve been thinking about a few things for a while now. I would really love to see at least my Android Wear OS (Fossil Watch) battery in Home Assistant. My partner has everything from Apple and the iOS app already shows the connected Apple Watch Battery levels in Home Assistant. I would love to see this too in the Android app with my Fossil Watch (WearOS). I think the best way is indeed to read the status from my Android phone that is almost constantly connected with my Watch. Specifically also my Google Account contains the battery level with the “Find my Device” service, I still have to look into that, maybe we can extract it from their API’s too. But moreover, this would otherwise be done using bluetooth, so…

Why not more bluetooth devices?

But, I think this could be even broader. I would love to see this for more Bluetooth devices such as headphones. I also have two wireless headsets, Bose QuietComfort 35 and JBL Tune 500BT that need regular charging too. I would love to see the battery states of those as well. I don’t know enough about Bluetooth but I can imagine that all Bluetooth devices have an unique identifier (like a mac-address) and I would love to see this devices as “device” in my home-assistant integration.

From multiple parent devices?

I would consider the wearable or headset in this case as a child-device. And the device it is connected to (laptop, tablet, phone) as a parent-device. I sometimes connect these headsets between different parent devices (laptop, tablet, two different phones). So when another parent connect to a child already known by Home Assistant, I think the mobile apps (iOS and Android) should give info to the home assistant such as device_id, battery_level That way Home Assistant knows to what device the info came from so which parent it is connected to and when it is connected with it knows the battery level and possible other information such as noise_cancellation_level or volume or whatever is available for that device… I already found https://www.bluetoothgoodies.com/ but it doesn’t have an API unfortunately. I could try to make something myself for when it is connected to my laptop (for Windows/Linux) but I lack the time and skills currently for making something like this work for Android, WearOS or iOS.

Not all bluetooth devices are constantly connected and therefor I would keep in mind that Home Assistant should just work in this case with the “last known values” and “assume” that is it disconnected when no new information was provided for some time by any parent device.