Command.setRGB constructor
Command to set color of the device (main light).
rgb
- the target color. It should be represented as integer in range from 0 to 16777215 (hex:0xFFFFFF)effect
- same as in Command.setColorTemperature.duration
- same as in Command.setColorTemperature.
This command is accepted only if the device is in 'ON' state.
Implementation
Command.setRGB({
this.id,
required int rgb,
required String effect,
required int duration,
}) : method = CommandMethods.setRGB,
parameters = <dynamic>[rgb, effect, duration];