Create my own BLE motion sensor

I would like to utilize esphome on an ESP32 to create a motion sensor that sends it’s values via BLE to HA bluetooth instead of using wifi.

Ultimately I’m looking to run the ESP32 with a battery and only wake it when motion is detected, send the motion to Bluetooth>HA and then sleep again. No other wifi or battery draining services should be running

I played around a bit, but cannot seem to get it going. Any guidance would be appreciated!