Keep connection between ESP32 bluetooth proxy and switchbot

If you have a dedicated ESP32 for the switchbot anyway (without other usecases on the same device), I’d always recommend SwitchBot bot/curtain/meter/contact/motion MQTT ESP32 bridge - Local control
Rock solid since day 1 I used it.