3a40741096
- README: WLED pull/push usage, sunrise alarm, white vs warm (CCT) section - wled_push: --cct 0-255 for segment 0 color temperature - wled_config: white.json, warm.json, sunrise presets; updated state/full Made-with: Cursor
89 lines
2.3 KiB
Markdown
89 lines
2.3 KiB
Markdown
# Home Assistant
|
|
|
|
Scripts and config for managing WLED at `192.168.240.30`.
|
|
|
|
## WLED scripts
|
|
|
|
Python 3, no extra deps (stdlib only).
|
|
|
|
### Pull (read state/config from WLED)
|
|
|
|
```bash
|
|
# Full snapshot (state + info + effects + palettes)
|
|
python wled_pull.py
|
|
|
|
# Just state, info, or config
|
|
python wled_pull.py state
|
|
python wled_pull.py info
|
|
python wled_pull.py cfg
|
|
|
|
# Save to file
|
|
python wled_pull.py --save wled_config/backup.json
|
|
python wled_pull.py full -o wled_config/full.json
|
|
```
|
|
|
|
### Push (send commands to WLED)
|
|
|
|
```bash
|
|
python wled_push.py --on
|
|
python wled_push.py --off
|
|
python wled_push.py --toggle
|
|
python wled_push.py --bri 128
|
|
python wled_push.py --preset 1
|
|
python wled_push.py --file wled_config/state.json
|
|
python wled_push.py --file wled_config/sunrise_8am.json
|
|
```
|
|
|
|
Use `--host` to override the default `192.168.240.30`.
|
|
|
|
### White vs warm light (CCT)
|
|
|
|
Your WLED device (**WLED-Gledopto** at `192.168.240.30`) supports **CCT** (color temperature). In the API, segment `cct` uses a relative scale:
|
|
|
|
- **`cct: 0`** → warmest (warm white, ~2700 K)
|
|
- **`cct: 255`** → coolest (cool white, ~6500 K)
|
|
|
|
**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.
|
|
|
|
## Sunrise alarm
|
|
|
|
`wled_config/sunrise_8am.json` starts a 30-minute sunrise that finishes at `08:00`.
|
|
|
|
```bash
|
|
# Test the sunrise payload immediately
|
|
python wled_push.py --file wled_config/sunrise_8am.json
|
|
|
|
# Poll the local clock and trigger the sunrise daily
|
|
python sunrise_alarm.py
|
|
|
|
# Custom alarm time and duration
|
|
python sunrise_alarm.py --alarm 08:00 --duration 30
|
|
```
|