This is how I created eBrake switches for my existing hydraulic brakes.
I purchased two surface mount reed switches from element14
http://au.element14.com/jsp/search/productdetail.jsp?sku=1081695&CMP=i-55c5-00001621 and some 3mm rare earth disc magnets from eBay.
Yep those are millimetres:
Tacked in place with superglue (note the stack of magnets on the lever pivot):
Secured with epoxy resin (magnets and reed switch):
Covered with black Sugru rubber putty:
Ignore the spit residue (used to smooth the putty).
It was quite easy to find an optimal position for the magnets, so the switch activates at the slightest pressure on the brake lever but not so sensitive that going over a bump would activate it.
The only problem I had was that I forgot that my twist throttle had magnets in it! The additional magnetic field caused the reed switch to activate far too easily. Snapping the epoxied magnets off and repositioning slightly further away from the reed switch solved the problem.
Cost:
$14 for the reed switches
$3 for the magnets (with plenty left over)
$7 for the Sugru (1 of 3 packets used, $21 for three packets)
Total of $24 for two ebrake switches.