While I don’t see a huge amount of value in using your HA server as a ble scanner these days (with ESPHome covering that well), I was using something similar to actively scan for my phone’s traditional Bluetooth (not BLE) based on hallway motion and apartment door events as part of my overall faster home arrival/departure detection strategy.
Unfortunately it’s not available on HA OS any more.
This integration is only available on Home Assistant Core installation types. Unfortunately, it cannot be used with Home Assistant OS, Supervised, or Container.
I then moved this approach to Monitor, which also has waning support, but also can leverage traditional Bluetooth via a pi zero or other device.