2003 Odyssey brakes

Just recently, this problem started. When I start the car, I cannot shift out of park for several attempts. It seems the brakes are not engaging correctly so I can shift from Park to Drive. It take several pumps on the breaks until I can feel a change. Then I can shift. i thought it may have been caused by heat wave, but recently, I experience this at night. Any ideas?

When it wont shift are the brake lights working?

If not,the brake light switch needs adjusting or replacing.