Following the following blog:
How to connect just about any Xiaomi BLE device to ESPHome using custom components
I realise I don’t fully understand how to use the ESP32 here. I can see examples of the yaml code at https://github.com/dentra/esphome-components/tree/master/components/miot_cgpr1 but should I be loading some code onto the ESP32 first and how does ESPHome tie it all together?