unplug the gray connector in the harness for and near the TPS for about 5 sec then replug. Turn off key then start. If at any time when engine running the rpm does weird things a reset will usually fix it till the next time. Not sure what it will take to permanently fix these erratic idle issues after all items checked and appear in spec?
I have had good luck with reducing electric issues by cleaning the connectors and fill with dielectric grease and replug. Do same with battery + - connections. Also good engine grounds important and adding a ground net system (see Tech how to) for additional ground points.