Added time dependent light switching