I would like to be able to change a variable over time.
Change the variable from x to y in specified minutes. (Change from 1 to 100 in 60 minutes)
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...
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...
This is how I do something similar. The basis of the rule uses variable math to calculate the slope and value using basic algebra...
y=m*x+b and m = (y2-y1)/(x2-x1)
This rule is WAY more complicated than necessary, but i wanted it to be flexible so that I could change the duration, start values, or end values without having to rewrite the rule. So most of these values are local variables.
The 2 main things that apply to your scenario are the slope (ctSlope and levelSlope) calculations and then the final value calculations (ctValue and levelValue).
I can offer more details if you need, but it might be a few days.
OR i just saw this on another thread. Perhaps you could use this action in rule machine to set the color and level of a virtual bulb, then capture those settings into your variables.
Well, thank you @dylan.c for the foundation rule! I started by copying the rule. I then added StartTime and EndTime variables. I filled in the EndTime variable (10:00).
I added the following to the rule:
Set StartTime to current time
Set durationMin to minutes of difference between StartTime and EndTime
The rest is your rule. I now have the perfect way to set a central variable from warm dimmed to daylight bright. Starting an hour before sunrise and ending at 10:00.
I'm now going to try to translate the whole rule to reverse the process from an hour before sunset to 23:00.