Command.startColorFlow constructor
Command.startColorFlow({})
Command to start a color flow (main light).
count
- the total number of visible state changes before color flow stops. 0 means infinite loop.action
- the action taken after the flow is stopped:- 0 device recovers to the state before the color flow started
- 1 devices stays at the same state whe the flow stopped
- 2 turn off the device after the flow is stopped
flowExpression
- the expression of the state changing series. Each state is defined as a 4-tuple[duration, mode, value, brightness]
- duration - in milliseconds, minimum 50
- mode - 1: color, 2: color temperature, 7: sleep
- value - RGB when mode is 1, color temperature when mode is 2, ignored when mode is 7.
- brightness - brightness value, -1 or 1 ~ 100. Ignored when mode is 7. When this value is -1, brightness in this tuple is ignored.
This command is accepted only if the device is in 'ON' state.
Implementation
Command.startColorFlow({
this.id,
required int count,
required int action,
required String flowExpression,
}) : method = CommandMethods.startCF,
parameters = <dynamic>[count, action, flowExpression];