Lets try it this way, firsst thing to do is to have your alternator and battery tested. if they check out OK, then the problem could be corroded electrical wiring the entire current from the electrical system goes through the headlight switch, this can cause a bottle neck and lower the voltage to the rest of the car causing the dash indicator light to come on at idle,