I haven't run into those (I mostly drive in rural areas--in fact, there's no stoplight in my county) -- but I do run into some lights that just change in the middle of the night, for no reason, and then take a really long time to change back to green, despite not even a single car being present / going through.

Lights with sensors have a backup pattern of timed changes so that you won’t get stuck at a light where the sensor isn’t seeing your car.