Car make/model?
If caliper pistons are clean and smooth, must be a master cylinder issue?
I doubt the switch is on the pedal, most are located in the pressurised portion of the brakes somewhere on the master cylinder. This gives a WAY more accurate brake light response, since the physical position of the pedal may or may not relate to braking force being applied.