Hey anyone, I need some help.
My question is how to implement support for a PINcode on the ESP Bluetooth Proxy?
I am relatively new to ESPHome and am trying to use it to connect my XiaoXiangElectric battery to Home Assistant. This unit has a 6 digit pin and I have tried a number of add-ons but all without succes. Now I have implemented BLE Battery Management add-on by Patman15 which looks very promissing and works with the ESPHome proxy. I tried adding a little automation to the ESPHome Proxy but although it seems to have some effect it does not work as expected.
substitutions:
name: m5stack-atom-lite-167c28
friendly_name: Bluetooth Proxy 167c28
packages:
esphome.bluetooth-proxy: github://esphome/bluetooth-proxies/m5stack/m5stack-atom-lite.yaml@main
esphome:
name: ${name}
name_add_mac_suffix: false
friendly_name: ${friendly_name}
api:
encryption:
key: 6llsCV9YTHgsVR2fwnb95QdmAHP5dFkr6XWTkSaQ1ig=
esp32_ble:
io_capability: keyboard_only
esp32_ble_tracker:
ble_client:
- mac_address: "A4:C1:37:04:2D:BE"
id: hans_battery
on_passkey_request:
then:
- logger.log: "Authenticating with passkey"
- ble_client.passkey_reply:
id: hans_battery
passkey: 000000
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
Anyone any idea?