Oil light questions on 1999 Ford Taurus

I just recently replaced the oil pan gasket and now when the car is idled the light comes on.But once I accelerate it goes off the cars drives fine otherwise. My fiest inclination is to change the oil pressure sensor. Am I on the right track.

Get Your Car Fixed at a RepairPal Certified Shop.
We certify shops based on expertise, quality work, and verified customer reviews
1 answer
If the problem happened right after the oil pan work, you may have accidentally moved the oil pick-up tube so that it is not getting the right amount of oil at idle. I would do a mechanical oil pressure test at idle to make sure that the pressure at idle is at spec which is around 10-12 psi minimum.