iPhone Presence during certain times

Just more of a question than anything else (Hope this is the right area to ask). Just purchased a smart things hub, but I am scratching my head a little in terms of setting it so that lights only turn on when I arrive home after sunset. I can see I can make them come on when presence is detected or after sunset, but no way can I do this so they only turn on when I come home after sunset.

There’s a few ways this could be done.

Using base routines: Create 2 different modes (Daylight/SunsetEvening)
Then create one routine to change the mode to SunsetEvening when the time is sunset. Then have another routine that turns the lights on when you come home but only run if mode is SunsetEvening.

Now thats using the built in systems, but there is something called Rule Machine, search the forums for that and on how to install it and use it.
It will do 95% of all your home automation needs. (I use it massively).