public class StateUpdate
extends Object
| Constructor and Description |
|---|
StateUpdate() |
| Modifier and Type | Method and Description |
|---|---|
StateUpdate |
setAlert(State.AlertMode mode)
Set the alert mode.
|
StateUpdate |
setBrightness(int brightness)
Set brightness of light.
|
StateUpdate |
setColorTemperature(int colorTemperature)
Switch to CT color mode and set color temperature in mired.
|
StateUpdate |
setEffect(State.Effect effect)
Set the current effect.
|
StateUpdate |
setHue(int hue)
Switch to HS color mode and set hue.
|
StateUpdate |
setOn(boolean on)
Turn light on or off.
|
StateUpdate |
setSat(int saturation)
Switch to HS color mode and set saturation.
|
StateUpdate |
setTransitionTime(int timeMillis)
Set the transition time from the current state to the new state.
|
StateUpdate |
setXY(float[] xy)
Switch to XY color mode and set CIE color space coordinates.
|
StateUpdate |
setXY(float x,
float y)
Switch to XY color mode and set CIE color space coordinates.
|
StateUpdate |
turnOff()
Turn light off.
|
StateUpdate |
turnOn()
Turn light on.
|
public StateUpdate turnOn()
public StateUpdate turnOff()
public StateUpdate setOn(boolean on)
on - on if true, off otherwisepublic StateUpdate setBrightness(int brightness)
brightness - brightness [1..255]public StateUpdate setHue(int hue)
hue - hue [0..65535]public StateUpdate setSat(int saturation)
saturation - saturation [0..255]public StateUpdate setXY(float x, float y)
x - x coordinate [0..1]y - y coordinate [0..1]public StateUpdate setXY(float[] xy)
xy - x and y coordinates [0..1, 0..1]public StateUpdate setColorTemperature(int colorTemperature)
colorTemperature - color temperature [153..500]public StateUpdate setAlert(State.AlertMode mode)
mode - alert modeState.AlertModepublic StateUpdate setEffect(State.Effect effect)
effect - effectState.Effectpublic StateUpdate setTransitionTime(int timeMillis)
timeMillis - time in milliseconds [0..6553600]