In addition to the previous answer, you will find a ready to use solution with the Timeline picker, without any programming and own static rules.
After you have setup a running OH and bind your devices you can install the timeline picker and you have a UI for all lamps you want control with and without sun events.