pub struct State {Show 17 fields
pub on: Option<bool>,
pub bri: Option<u8>,
pub transition: Option<u8>,
pub tt: Option<u8>,
pub ps: Option<i32>,
pub psave: Option<u8>,
pub pl: Option<i8>,
pub nl: Option<Nl>,
pub udpn: Option<Udpn>,
pub v: Option<bool>,
pub rb: Option<bool>,
pub live: Option<bool>,
pub lor: Option<u8>,
pub time: Option<u32>,
pub mainseg: Option<u8>,
pub playlist: Option<Playlist>,
pub seg: Option<Vec<Seg>>,
}
Fields§
§on: Option<bool>
On/Off state of the light
bri: Option<u8>
Brightness of the light. If on is false, contains last brightness when light was on (aka brightness when on is set to true. Setting bri to 0 is supported but it is recommended to use the range 1-255 and use on: false to turn off. The state response will never have the value 0 for bri.
transition: Option<u8>
Duration of the crossfade between different colors/brightness levels. One unit is 100ms, so a value of 4 results in a transition of 400ms.
tt: Option<u8>
Similar to transition, but applies to just the current API call. Not included in state response.
ps: Option<i32>
-1 to 65535; ID of currently set preset. 1~17~ can be used to iterate through presets 1-17.
psave: Option<u8>
1 to 16 (250 in 0.11); Save current light config to specified preset slot. Not included in state response.
pl: Option<i8>
-1 to 0; ID of currently set playlist. For now, this sets the preset cycle feature, -1 is off and 0 is on.
nl: Option<Nl>
Night light
udpn: Option<Udpn>
UDP sync
v: Option<bool>
If set to true in a JSON POST command, the response will contain the full JSON state object. Not included in state response
rb: Option<bool>
If set to true, device will reboot immediately. Not included in state response.
live: Option<bool>
If set to true, enters realtime mode and blanks the LEDs. The realtime timeout option does not have an effect when this command is used, WLED will stay in realtime mode until the state (color/effect/segments, excluding brightness) is changed. It is expected that {“live”:false} is sent once live data sending is terminated. Not included in state response.
lor: Option<u8>
0, 1, or 2; Live data override. 0 is off, 1 is override until live data ends, 2 is override until ESP reboot (available since 0.10.0)
time: Option<u32>
Set module time to unix timestamp. Not included in state response.
mainseg: Option<u8>
0 to info.leds.maxseg-1; Main Segment
playlist: Option<Playlist>
Custom preset playlists. Not included in state response (available since 0.11.0)
seg: Option<Vec<Seg>>
Array of segment objects; Segments are individual parts of the LED strip. In 0.9.0 this will enables running different effects on differentparts of the strip.