I have the same issue that seemed to only happen after the last mini-update to the S4.
In any event, blowing hard into the earpiece did not work.
I looked at the sensor, and it looked fine.
I then dialed *#0*# to get to the diagnostic mode, and clicked on SENSOR.
I then watched the sensor...