This is a Basic Application to Control Relay Modules connected to an ESP32 or Arduino BLE or any Bluetooth Low Energy Device. You Have to Bring Your Own Bluetooth Appliance Service id, Characteristic id and Specific Commands to Toggle the relay, if you want to Read the Relay State too Consider using a Characteristic Read function or Try a Write With Function and add a Array or Tuple to Save Relay State, in my case i use Two Way Switches, so its not a matter for me.
Have Fun.