Actuation by moving ferromagnetic material, switch and magnet being fixed