Command.setBrightness constructor

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

Command to set brightness of the device (main light).

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

Implementation

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