Many have done this many different ways. For my exterior lights - 2 dimmers and a switch - I created a virtual switch (VS) and use PLEG for the logic. You can use native Scenes or Reactor instead of PLEG. When I turn manually on/off the VS, it turns on/off those 3 switches. Logic further turns on/off that VS depending on sunset/sunrise and sky conditions. One of the lights dims at midnight and restores to 100% at 6am. One of the lights is controlled by a door sensor, going on when a door is opened. So what you are looking to do can be done either simply or with complex logic. I suggest you start simple, try a few things, and as you learn you can add complexity.