A lamp device includes a power line and a light bulb socket connected to a light
sensitive controller, and a rotary lamp base. The rotary lamp base includes a shell
member, a tubular pivot seat, and a retaining unit. The shell member includes a
top wall and a peripheral wall, and receives the socket and the controller therein.
The top wall is formed with a through hole that has a hole axis. The peripheral
wall is formed with a light sensor hole registered with the controller. The retaining
unit retains rotatably a lower seat portion of the pivot seat in the through hole
so as to permit rotation of the shell member relative to the pivot seat about the
hole axis.