I’m trying to write an automation which turns on a switch (light) at a set time (1830) of sunset, whichever is earlier.
I’ve set 2 triggers to be Sunset and the time of 1830, however I can’t get my head around what the conditions need to be call the action based on the time comparison.
You don’t need any conditions. Whichever trigger occurs first will turn your switch on. The next time it triggers it will be turning on a switch that is already on, so nothing actually happens.
If you really want to prevent this second action from happening include a state condition that checks for the switch being off. It will be on when the second trigger occurs.