Put this in the forum and never got any response.
Thought I would post it here.
I use the Bluetooth Device Tracker as my way in HA to track when I come home and leave and
it works perfect.
Since bluetooth knows more info then just when it connects, I was wondering if there would be any way
to have entities based on bluetooth phone that is connected.
Say entity.phone_ringing or entity.battery_level.
This would allow alot more control in HA for example to pause media player if phone is ringing etcā¦
Where I live my cellular data is faster than my home internet so I donāt connect my phone to wifi.
Just thought if bluetooth could show those sensors their must be other people who could use it.
To get into the issue itself a bit more, supporting bluetooth on python is in a bad state. The best that can be done at the moment is support os dependent implementations and they are often not able to be used interchangeably.
Until there is a good python library it is probably easier to use the app as others have stated or create a esphome sensor or something that gets the information via bluetooth for you and transfers it to home assistant.
At least thatās my opinion since Iāve tried to get more robust and generic bluetooth support implemented and although I got it working somewhat, it was never in a good enough state to release and I never got it platform independent and reliable.
Ideally youād want to support bluetooth in home assistant similarly to the way zwave or zigbee are supported.
Thanks for the detailed explanation.
The main thing I was trying to do was sense if my phone is ringing and mute media player.
Any idea on how to do that thru bluetooth with a sensor as you suggested?
Any way of getting the sensor for bluetooth connections to show the device name rather than a hex ID in the connected_paired_devices attribute? Since I use bluetooth in the car, I could use it to tell HA when Iām driving. I know I could do that by figuring out the ID mappings to names myself, but it would be nice to have it done for me.
The problem is that not all bluetooth devices give a name as the name was added at a later version. The mac address is something you have direct access to on your phone so it should be easy to map it.