brake sensor switch on 2007 Pontiac G6

when i brake my brake lights go off, the dealershipsays that i need the brake sensor replacement is it the same as the brake switch where the pedal are?

Get Your Car Fixed at a RepairPal Certified Shop.
We certify shops based on expertise, quality work, and verified customer reviews
1 answer 1 comment
It is likely that this is the brake pedal position sensor, down by the brake pedal. There should be three wires going into it - yellow, white and brown. There is another brake sensor, which is brake pressure sensor. That sensor is not tied into the brake light circuit. That sensor is under the hood on the hydraulic unit.
Is the Brake Pedal Position Sensor Dangerous when it goes out? Is it something I need to fix ASAP?