Use ESPHome BT Proxy in HA component

Hi. Since HA 2022.10 and ESPHome 2022.9.0 we got bluetooth_proxy for active connections.
I want to write custom integration which needs to connect to the device, but my HA setup does not include BT adapter - I’m currently using ESPHome to passive listen BLE packets.

My question is - how this proxy is supposed to work? There is conflicts in documentation:

So, where I can find docs about way to use “remote” BT adapter, provided by ESPHome, in custom integration? HA docs about BT does not say anything over using Bleak client, but in my case, it seems to find no adapters (or my code has bug?). In act of desperation I found that ESPHome api.proto has methods named bluetooth_gatt_write and similar, which is what I want to use, but I didn’t found nothing about using raw API in integration - probably it’s not a way which it should be used.

All you need to do is flash an esp32 with the code and once its on wifi Home assistant will auto find it.

check these links out…

I’m already using ESPHome to read Xiaomi thermometer (using old esp32_ble_tracker), but my question is how to use it from code level to perform active connection - that’s why I wrote this post in “Development” category, read my whole post please.

Also, I added to ESPHome config:

  active: true

but nothing new discovered in HA.