I use the Home 3 app by Matthias Hochgatterer (look for Home 3 in the App Store) to set one hour before sunset and at sunset itself. The Home 3 app can do some of these complex automations which the Apple app cannot (yet) do.
Based on your comment, I purchased the HOME+ 4 (his updated version) on sale for $9.99. Very good program that makes it much easier to setup your automation. It indeed has a fuller set of features than Apple's Home app. Thanks for the tip!
One thing I learned from Reddit's HomeKit threads is the change from IOS 12 to IOS 13 Apple changed the way it deals with timer events triggered by the accessory. In the past, I could turn off a FAN or Light when it turned on by creating a Scene and Automation; convoluted, but worked. Well, Apple changed this so you cannot turn off the triggering device at the end of the timed event. This is crazy stupid (IMHO). I cannot figure out a work around (someone on reddit commented to use HomeBridge and a virtual accessory as a workaround).
My workaround (somewhat) is now I changed my timed bathroom fan to be triggered with the turning on of the bathroom light, which then turns on the fan. I can then have the fan set to turn off in a timed condition. So now the fan will come on automatically with the light and then time out correctly. If you manually turn on the fan, then it will stay on (un-timed). But this is ridiculous since most of the time you do not want or need the fan to be turned on. So now, I have to manually turn the fan off after turning on the light.
Something so simple as a timed switch event should be straight forward and easy to to implement.