It’s a hall effect (solid state) style switch with 3 terminals (plus 2 for LED on some models).
The pinout is described in the picture below, with I being input, O being output and G being ground.
The hall effect circuit can be used as follows:
In my application I provided 5 volts to the input, dispensed with the capacitor, LED and resistor. Instead of the load I used a microcontroller pin, set as an input and with an internal 20K pullup to 5v.
Hope this helps someone!