American Garret Morgan was awarded the patent for an automated traffic signal.

Morgan’s invention was not the first of its kind, but unlike the other traffic signals which just had stop and go signals, his traffic light had a third signal that warned drivers about changes in the stop and go lights. This signal was the precursor for today’s yellow light.

Source