Skip to content

Commit 7afc5e1

Browse files
Documented sb, ib and sc options used with psave (#285)
1 parent 35852d8 commit 7afc5e1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

docs/interfaces/json-api.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,15 @@ Sample JSON API response (v0.8.4):
133133
| JSON key | Value range | Description
134134
| --- | --- | --- |
135135
on | bool | On/Off state of the light. You can also use `"t"` instead of `true` or `false` to toggle.
136-
bri | 0 to 255 | 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_.
136+
<a id="bri"></a> bri | 0 to 255 | 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_.
137137
transition | 0 to 65535 | Duration of the crossfade between different colors/brightness levels. One unit is 100ms, so a value of `4` results in atransition of 400ms.
138138
tt | 0 to 65535 | Similar to transition, but applies to just the current API call. Not included in state response.
139139
ps | -1 to 250 | ID of currently set preset. `1~17~` can be used to iterate through presets 1-17, or `4~10r` to select random preset between presets 4 and 10 (inclusive).
140140
~~pss~~ | 0 to 65535 | Bitwise indication of preset slots (0 - vacant, 1 - written). Always 0 in 0.11. Not changable. _Removed as of v0.11.1_
141141
psave | 1 to 250 (16 prior to 0.11) | Save current light config (state) to specified preset slot. Not included in state response.
142+
sb | bool | Used with `psave`. Save segment bounds (`start` & `stop`).
143+
ib | bool | Used with `psave`. Save [brightness](#bri).
144+
sc | bool | Used with `psave`. Save [selected segments](#seg-sel).
142145
pl | -1 to 250 | ID of currently set playlist. _(read-olny)_
143146
pdel | 1 to 250 | Preset ID to delete. Not included in state response.
144147
nl.on | bool | Nightlight currently active
@@ -193,7 +196,7 @@ o1 | bool | Effect option 1. Custom options are hidden or displayed and labeled
193196
o2 | bool | Effect option 2.
194197
o3 | bool | Effect option 3.
195198
pal | 0 to info.palcount -1 | ID of the color palette or ~ to increment, ~- to decrement, or r for random.
196-
sel | bool | `true` if the segment is selected. Selected segments will have their state (color/FX) updated by APIs that don't support segments (e.g. UDP sync, HTTP API). If no segment is selected, the first segment (_id_:`0`) will behave as if selected. WLED will report the state of the first (lowest _id_) segment that is selected to APIs (HTTP, MQTT, Blynk...), or `mainseg` in case no segment is selected and for the UDP API. Live data is always applied to all LEDs regardless of segment configuration.
199+
<a id="seg-sel"></a>sel | bool | `true` if the segment is selected. Selected segments will have their state (color/FX) updated by APIs that don't support segments (e.g. UDP sync, HTTP API). If no segment is selected, the first segment (_id_:`0`) will behave as if selected. WLED will report the state of the first (lowest _id_) segment that is selected to APIs (HTTP, MQTT, Blynk...), or `mainseg` in case no segment is selected and for the UDP API. Live data is always applied to all LEDs regardless of segment configuration.
197200
rev | bool | Flips the segment (in horizontal dimension for 2D set-up), causing animations to change direction.
198201
rY | bool | Flips the 2D segment in vertical dimension. _(available since 0.14.0)_
199202
on | bool | Turns on and off the individual segment. _(available since 0.10.0)_

0 commit comments

Comments
 (0)