Headlight flash on and off by themselves

Dimmer Switch maybe going bad.

That was my first thought as well, but I changed it and have the same issue.