Intelligent over-temperature protection for LED lighting applications