Command.setColorTemperature constructor

Command.setColorTemperature({
  1. int? id,
  2. required int colorTemperature,
  3. required String effect,
  4. required int duration,
})

Command to set color temperature of the device (main light).

  • colorTemperature - the target color temperature.
  • effect - supports two values - 'sudden' and 'smooth'.
  • duration - total time of the gradual changing in milliseconds. Minimal supported duration is 30 milliseconds.

This command is accepted only if the device is in 'ON' state.

Implementation

Command.setColorTemperature({
  this.id,
  required int colorTemperature,
  required String effect,
  required int duration,
})  : method = CommandMethods.setCtAbx,
      parameters = <dynamic>[colorTemperature, effect, duration];