I know that this thread is a bit old now, but I thought I would quickly share my solution for this. I haven’t created to many complex pistons yet. I am still trying to learn my way around, so please be kind.
This is my piston for for fading lights up. In this example i wanted the fade up to have finished by 15 minutes before sunset, but only if i was at home.
You can set the color temperature, from, to levels and the fade duration (in minutes) at the top of the piston. You can also set a post fade duration, (in minutes) which will turn the lights off.