I really appreciate this piston. It does exactly what I need. I also encountered what KiloWatts was discussing with the lightTemperature giving a sawtooth pattern in the afternoon. I dumped the formulas into a spreadsheet and figured out that it was a simple error. The calculation within the “Time is before sunset” IF section for (@lightTemperature) should be
(({hourSunset} - {$hour24}) * {lightTemperatureIncrementAfternoon}) - (round($minute / 5) * {lightTemperatureMinuteIncrementAfternoon})+{@lightTemperatureMin}
The formula in the original code added the lightTemperature by minute increment instead of subtracting it. This caused the lightTemperature to go up slightly until it hit the hour where it dropped. Hope this helps everyone.