Oh, that's how you're supposed to do that! I did solution 2, which was hard because the level geometry kept bouncing the magnet onto the switch.
Having multiple solutions is pretty cool (even if they're not all intended)