The DFRobot Magnetic Switch mainly comprises two parts - the inducting end and trigger. The former has a reed switch enclosed inside and there is a cable connected to it, and the latter is a magnet enclosed within a plastic case.
This magnetic switch is very applicable to harsh environments and can be used indoor/window position limiting device, intelligent toilet, car/electrical bike anti-theft, smart home, etc.