Help with Bluetooth lock

For the bluetooth geniuses here, I bought a bluetooth lock for the refrigerator outside and the cabinet outside, something from ALI, that as soon as there is a device that is connected via bluetooth to the lock it is in an unlocked state, as soon as it does not have a bluetooth connection to any device it is locked, I was thinking if it is possible to connect esp to it and make a disconnection scene or script Bluetooth or something like that or connect it to the ha server and send a command in the terminal somehow through ha that will turn off the bluetooth and turn it on… Does anyone have any idea if this can be implemented or is there another creative solution?

1 Like