For Automatic Switching of streetlight,the Op-amplifieris used as:

Inductor

Conveerter

Rectifier

Comparator