Yes, you can do it using the workflows. The workflows are a functionality that allows you to excecute some operations if some condition are met.

For example, you can tell the system that if it is 8:30 the brightness has to be controlled by the sensor, and after 21:00 it has to be controlled in a time based schedule.