I needed a sensor to tell me when my deck storage box was opened.
The gap between the lid and the box and acceptable place to mount it, was too large for the sensor magnet to operate the sensor switch.
Realizing the small part section of the sensor switch is just a magnet, I substituted the magnet from one of my burglar alarm magnet switches. It’s much more powerful.
Now the larger gap between the box and lid is no longer a factor, sensor switch works great !