Precautions for accidentally pressing device buttons

I want to suggest improving the menu - adding a setting for device buttons to prevent accidental pressing. I have a device responsible for opening street doors and there were not pleasant cases when I used the ewelink program late at night, flipping through the devices, pressed the button and it was not very pleasant, since the opening of the doors is accompanied by a sound signal and it frightened my relatives, and I was punished. My suggestion is this - make it so that the user himself can choose how to activate the device (by pressing or sliding to the side) sliding towards the slider will prevent accidental pressing