New custom integration: Bluetooth LE virtual pinpad input

This component lets an ESP32 running esphome act as a virtual pinpad over bluetooth: Send the right value to the device, then trigger something else to happen (like cover.toggle: garage_door).

It’s intended for places where you can’t have or expose a real physical keypad. It could also be useful in situations where you need some sort of access control mechanism, but cannot rely on wifi.

Source code:

Example yml:

esp32_ble_pinpad:
  status_indicator: onboard_status_led
  static_secret_pin: "1234"
  on_pinpad_accepted:
    - logger.log: "Got pin over BLE, opening door."
    - cover.toggle: garage_door
  on_pinpad_rejected:
    - logger.log: "Warning: Incorrect pin was given over BLE"

It’s still experimental, so I’d love any additional eyes on it. In particular, it’s not (yet!) secure! I’m researching ways to accomplish that and have a plan in mind.

(Original thread here, which this grew out of. Apologies to anyone seeing both - I figured this category is the better long-term home.)

Update: I’ve whipped up a little iOS/Android mobile app for finding & sending pins to these devices.

Needs a little bit of polishing and bug fixing, but it works! Hope to release on app store after a little more time. Open source (MIT) just like the component. Code here for the curious: