| **Global brightness** | `state.bri` | Main dimmer for the whole light (0–255). When off, this is the brightness used when you turn on. |
| **Segment brightness** | `state.seg[].bri` | Per-segment brightness (0–255). Multiplies with the segment’s color/effect. |
| **White channel** | `state.seg[].col[0][3]` | The W in RGBW: primary color is `[R, G, B, W]`. White channel 0–255 (how much dedicated white is mixed in). |
**CLI:**
-`--bri N` — global brightness.
-`--seg-bri N` — segment 0 brightness.
-`--white N` — segment 0 primary color’s white channel (0–255). Use with Solid effect for predictable results.
```bash
python wled_push.py --on --bri 200# global only
python wled_push.py --seg-bri 128# dim segment 0 only
python wled_push.py --white 255# full white channel (segment 0)
python wled_push.py --bri 255 --seg-bri 255 --white 255# all full
Your WLED device (**WLED-Gledopto** at `192.168.240.30`) supports **CCT** (color temperature). This controls the **warm vs cool** blend of the white output; the **white channel** (`--white`) controls how much white is mixed in (e.g. with RGB). In the API, segment `cct` uses a relative scale:
**Current state** (from your last pull): light **on**, brightness **254**, segment **0** with **Solid** effect (`fx: 0`), **CCT 0** (warm), primary color dim gray `[56,56,56,56]`.
**Set cool/white light:**
```bash
python wled_push.py --on --bri 255 --cct 255
# or from a JSON file:
python wled_push.py --file wled_config/white.json
```
**Set warm light:**
```bash
python wled_push.py --on --bri 255 --cct 0
# or:
python wled_push.py --file wled_config/warm.json
```
To only change color temperature and keep current on/off and brightness, use only `--cct`:
```bash
python wled_push.py --cct 255# switch to cool white
python wled_push.py --cct 0# switch to warm
```
### Config backup
`wled_config/` holds JSON pulled from the device: `full.json`, `state.json`, `info.json`. Use `wled_push.py --file wled_config/state.json` to restore state.
Presets are stored on the WLED device; you can **define** them in JSON and **push** once to create/update them. Use the WLED `psave` API: include `psave` (preset slot 1–250), optional `n` (name), `ib` (include brightness), and the state you want saved.
**Example — Sunrise preset** (warm white, Solid, for the 8am alarm):
That sends the payload in `wled_config/presets/sunrise.json` to the device. The device saves it as preset ID 1 named "Sunrise". Home Assistant can then use `select.wled_gledopto_preset` with option "Sunrise" in the sunrise alarm script.
- **full.json** is a snapshot from **pull** (state + info + effects + palettes). It does not define presets; use `wled_config/presets/*.json` for that.
- To add more presets: create a new JSON file with `psave`, `n`, and state, then run `wled_push.py --file path/to/preset.json`.