After trying to do the custom switch competely from scratch, I decided to use a microswitch with a roller arm instead. As you move the knob, the ramp will move the roller arm down and with that, toggle the switch.
The switch in the off position
And the switch in the On position