Optional
durationThe duration in milliseconds this exact temperature value stays the same. When we transition to to the temperature value represented by this entry, it stays for the specified duration on the exact same value (with respect to brightness adjustment) until we transition to the next entry (see transitionTime).
The color temperature in mired.
The time in milliseconds the color temperature should transition from the previous entry to this one. For example if we got the two values A and B, with A.temperature = 300 and B.temperature = 400 and for the current time we are at temperature value 300. Then we need to transition smoothly within the B.transitionTime to the B.temperature value. If this is the first entry in the Curve (this value is probably zero) and is the offset to the transitionStartMillis (the Date/Time were this transition curve was set up).
The color temperature actually set to the color temperature characteristic is dependent on the current brightness value of the lightbulb. This means you will always need to query the current brightness when updating the color temperature for the next transition step. Additionally you will also need to correct the color temperature when the end user changes the brightness of the Lightbulb.
The brightnessAdjustmentFactor is always a negative floating point value.
To calculate the resulting color temperature you will need to do the following.
In short: temperature + brightnessAdjustmentFactor * currentBrightness
Complete example: