updating change light attributes functions to use the new time based approach