Set mode to be between sunset and sunrise?

I added a mode to be “Evening” (from all kind of reasons I need it…) how do I configure it to be set between sunset and sunrise ?

Period of time ”night"

I need another one, so I can use night for other things

If we are talking about a Location Mode, then you can only have one value set at a time so you would create two Automations, one with a Time condition set to the Specific time of Sunset that will Change this location’s mode to Evening, and a similar one for Sunrise that sets it to whatever the new mode is.

It may be tempting to use a Period of time but that only acts as a restriction to other conditions so doesn’t make the Automation do anything at the start and end of the period, and also there is no way to revert the setting to what it was previously.

If you actually want to be able to use more than mode at once then Location Modes are not the tool for the job. You either write all your Automations with the extra Time condition that sets the Period of time to Night, or you invent your own flag to do the job. For example you could create a Virtual Switch and set that to be on at sunset and off at sunrise and then test the state of that switch in your Automations.