I do not have a solution to your exact issue of ‘on at sunset and off in x number of hours’, but I can offer an alternative which may help in which the light would turn off at an exact time such as 10:30pm.
In your first routine, you setup to turn on at sunset and off ‘do nothing’. This routine will turn the light on at sunset.
In another routine, you setup to turn off at 10:30pm. When you create the routine, set the ‘When should it start?’ to 10:30pm (or whatever time you would like); remember to select the days of the week; set your Fade as desired; under ‘What should happen?’ set the room under ‘Where?’; and then set the scene to ‘off’ for that room; and save.
I agree that it is unfortunate the routine for on at sunset does have a corresponding off at a time or hours, and that my solution requires 2 routines (which are not obviously connected), but this is the workaround I am using.
Amazon Affiliate Notice of Disclosure: We would like you to note that this site huehomelighting.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com.