It's a common problem for pedals to malfunction after long use from wear to or dirt in the switch connections or rotary potentiometer in the pedal itself. You can spray some contacts cleaner directly into the pedal switch if you're willing to get into the pedal unit itself: https://www.amazon.com/WD-40-Specialist-Electrical-Contact-Cleaner/dp/B00AF0OFVU/ref=sr_1_6That might fix it. If not there was a pedal replacement available at one time https://syntaur.com/parts/yamaha/clp-230/12065-pedal-assembly-yamaha As you can see you might be able to get it directly from Yamaha co. you'll have to google their parts and service # but they might not make them anymore, or you can try Ebay. If you can get to the contact part you can try to match it with one of these: https://www.ebay.com/sch/i.html?_nkw=yamaha+clp+pedal&_sacat=619&_from=R40&_trksid=m570.l1313&LH_TitleDesc=1&_odkw=yamaha+clp+piano+pedal&_osacat=619&_sop=15
Button controls commonly can be fouled over time with accumulated dirt and oils from hands. You can get a cheap can of electronics control cleaner. It comes with a small very narrow plastic straw which can allow you to spray it into small slits or holes which can clear the dirt and then it just naturally evaporates. I would try that, you might fix it without even having to disassemble the keyboard. https://www.amazon.com/WD-40-Specialist-Electrical-Contact-Cleaner/dp/B00AF0OFVU/ref=sr_1_6
