P0504 means the two internal circuits of the brake light switch do not agree. Modern brake switches send two signals to the ECU for safety: one that closes when the pedal is pressed and one that opens. If the ECU sees both circuits in the same state at the same time, it sets P0504. The fix is almost always a new brake switch, sometimes combined with a pedal position adjustment.
P0504 is a electrical-related diagnostic trouble code classified as moderate severity. When your vehicle's ECU detects this condition, it stores P0504 and illuminates the check engine light.
