I wanted to have certain lights in my house turn off, or on, based on wunderground events (i.e. sunrise or sunset) but not at sunrise or sunset. I wanted to have my lights turn off 2 hours after sunrise and turn on an hour prior to sunset. To do this I explored a number of options (including creating a new C# class), but sometimes the simplest solution is the best solution. So here's how I accomplished my goal:
Added 2 new variables to the top of the Weather Underground program (34)
var sunriseDelayEvent = "SunriseDelay";
var DELAY = 2; //delay in hours after sunrise event/time for SunriseDelay event to be set
and then add this section later in the file (~ line 41 and 43)
Scheduler
.WithName(sunriseDelayEvent)
.SetSchedule(String.Format("{0} {1} * * *", sunrise_minute, sunrise_hour + DELAY));
After compiling, this created a new event w/ a correct cron expression in the scheduler tab. This event can then be referenced using the @SunriseDelay notation.