Quote Originally Posted by lakota
I'm using a residual valve from an S-10. It has an electrical connection at the top. I have no idea what it's for. I'm wondering if I can use it for a brake light switch.
That electrical connection is for a dash indicator light that operates only when you have a problem - there is an internal spool valve that moves in case of a failure at one end or the other of the vehicle.

A mechanical, on the brake pedal or rod or a line pressure switch is the only reliable way to go.