How do automated lights work?