Fade lights to a specific time

Has anyone found a way to fade lights to a specific time? In other words, instead of fading from 100% to 25% in 1 hour, I’d like to turn my lights on at sunset and fade them to 5% at 10pm. Doesn’t seem like I can enter a time. How is it possible doing it as an “expression”?