Clear the LEDs each time a state transition happens.