Changing variable over time

I would like to be able to change a variable over time.

  1. Change the variable from x to y in specified minutes. (Change from 1 to 100 in 60 minutes)
  2. Change the variable from x to y from now until specific time. (Change from 1 now to 100 at 12:00)

It might be possible. Then I would like to know how.

At this moment I'm thinking of using a virtual dimmer to steer the variable. That would work for option 1. But for option 2 it will mean that I will have to make another variable with value of minutes before specific hour. I would have to make such a variable for every hour that I would like to use. Not very simple...

Any ideas would be appreciated.

Sometimes it is helpful if you give an example of how you want to use these, as there may be alternative methods to explore.

I want to make a central Color_Temperature_Variable.
I would like to use this so that all my white lights will have the same temperature.
During the day a nice daylight color.
From a combination of illuminance and sunset (which could be anytime between 16:00 and 22:00) to 23:00 I would like to fade to a warm white.

I have a rule now based on illuminance only, but I cannot get it to work like I want. In summer the lights are too warm, which makes them look "old" and in winter it's too flourescent-like cold...

Download the Hubitat app