How to detect bluetooth device name that connected to Phone with HA App?

Hello,

The question is in subject.
I mean i would like to have a sensor of bluetooth network that my phone connected to. Like here with Wifi:


Thу same i would like to have for bluetooth.
Is it real?
It would be useful to detect that my phone connected the car’s bluetooth and now i am driving now.

I know that i can do it with macrodroid or with ittf or other app, but the question in native HA App.

Thanks a lot!

1 Like

I don’t think so at present. Don’t forget it is not the same as wifi. You can be connected to many Bluetooth devices at once.

No doubt of course this could be added to the ios/Android apps.

Having access to which bluetooth devices are connected to the phone would be very useful. You could detect when your phone is paired with your car (ie you’re driving), paired with your telephone headset (working or on a call), paired with your Garmin or Wahoo bike computer (you’re biking), your Garmin SPOT (you’re hiking), etc. And probably more ideas I haven’t thought of yet.

3 Likes

Exact what i am talking about!
Adding to ha app bluetooth and nfc makes it :100:% perfect!

Perhaps post an issue on GitHub.

1 Like

Or feature request? :upside_down_face:

This whole thread should be moved to feature requests. However there are only a couple of devs doing the companion app and it may come to attention better on GitHub.

Hi,

May I ask if there are some news about this feature request ?
It wouls be great to have it! :slight_smile:

Thanks,

regards

Hello,

In fact it’s already possible with the attributes connected_paired_devices of bluetooth_connection. For exemple I use it as a condition in an automation to check if my Garmin is connected. Value template:

{{ ('14:8F:21:03:D9:B5 (Edge 810)' ) in state_attr("sensor.pixel_4a_bluetooth_connection",'connected_paired_devices') }}

Regards,

Geoffrey

3 Likes

@xploid Geoffrey That was a tremendous help. Thank you.

Hi, can you help me to make it works please ? i don’t understand where i use the value template.
Thanks

condition:
  - condition: or
    conditions:
      - condition: state
        entity_id: binary_sensor.xiaomi_12_is_charging
        state: "on"
      - condition: state
        entity_id: sensor.xiaomi_12_bluetooth_connection
        state: >-
          {{ ('00:0A:9B:18:BF:95 (scala rider Q3)' ) in
          state_attr("sensor.xiaomi_12_bluetooth_connection",'connected_paired_devices')
          }}

Hi, if you haven’t figured it, you need to use a template condition, something like this

condition:
  - condition: or
    conditions:
      - condition: state
        entity_id: binary_sensor.xiaomi_12_is_charging
        state: "on"
      - condition: template
        value_template: >-
          {{ ('00:0A:9B:18:BF:95 (scala rider Q3)' ) in
          state_attr("sensor.xiaomi_12_bluetooth_connection",'connected_paired_devices')
          }}