Xiaomi Mi Motion Sensor 2

Xiaomi motion sensor2 - Hub - bluetooth - on MiHome app can see detection every 30 sec and on the HA yes

the Xiaomi Mi Motion Sensor 2 is called the RTCGQ02LM, which is currently not supported by ESPHome, only BLE monitor.

Product model: RTCGQ02LM   
internal model :lumi.motion.bmgl01
Firmware version:1.1.1_0011 20230618
Release date:

You have 4 options.

ESPHome

Jsut create a new project and the following line

esp32_ble_tracker:

bluetooth_proxy:
active: true

https://esphome.io/components/esp32_ble_tracker.html

https://community.home-assistant.io/t/raspberry-3b-acting-as-bluetooth-gateway/496613