If a car has pulled up at the lights or there are cars idling waiting for the lights to change. The smart traffic lights use an inductor loop installed under the asphalt in the road next to the lights to detect cars. Some smart light use lasers for this detection.