I strongly recommend an optical sensor over an electrical one.
The primary electro-optical element is called a photo-interrupter. It's basically an LED and a phototransistor together in a molded case. There's a gap between the two, so if you put something like a piece of cardboard between them, the optical signal is interrupted, and the transistor turns off. Remove the cardboard and it goes on again.
The total circuitry is simple enough I could advise you on it. Start a thread, maybe in Mac Programming, because that's where some other electronic stuff sometimes shows up. If you have a soldering iron and a modicum of skill using it, it won't be difficult. If you don't, you can practice soldering on some inconsequential things first. It's a lot like using an Xacto knife: practice makes perfect, but plan to make some mistakes early on.
I'll even find a part for you at Digi-Key. Since your washer dial has 3 separate OFF positions, I recommend buying at least 3 detectors, so you can put one at each distinct OFF position. I suggest buying a couple extras, so if one dies from clumsy soldering or mistaken connections, you don't have to reorder.