I have a 2000 Ford Windstar.
The headlights (and parking/tail lights) intermittently come on (and off), even after the headlights are switched off.
Typically, after parking, I'll turn off the headlights and remove the ignition key.
Sometimes the headlights will turn off as expected, but sometimes they stay on. If they are off, usually, within minutes, they will turn on, by themselves.
Sometimes, when this happens, they will "randomly" turn on and off a few times or more. This will be on and off every 2 to 5 seconds (sometimes more), but it is not consistent. Then at some point they will remain on. Sometimes the lights come on and stay on without flashing, and sometimes the lights stay off for a while, but then come on later.
The headlight system is a "standard" system, meaning there is no feature to "automatically" turn the headlights on/off based on the ambient light level.
The issue occurs day or night, and regardless of whether the ignition key is on or off or removed, and regardless of whether the engine is running or not.
The headlight switch is mounted to a small plastic panel that snaps in/out from the dash. I Popped this panel out, and removed the connector from the back of the headlight switch, and the headlights remained on.
As far as I know, when the headlight switch is turned on, the headlights remain on, at least that is what I have observed, but there may have been times where the flashing occurred with the headlights switched on, but I didn't notice.
This has happened since I purchased the car used. It seems it was rare at first, but it happens all the time now.
Some other oddities that I'm not sure of... It seems that sometimes, the parking/tail lights will come on but the headlights will be off, or the left tail light will be on, but the right tail light will be off. I can't be sure of this because it could have just been a matter of looking at one place or another while the lights were turning on/off, and thinking some lights were on and others were off. If this sort of thing is actually happening, it is rare because I have not been able to confirm it.
Currently, I have a "quick disconnect" on the battery and I always disconnect the battery when I park.
How do I troubleshoot this?