Add Home Assistant network control API
This commit is contained in:
parent
0d61eb6311
commit
d9e8fef376
4 changed files with 195 additions and 1 deletions
|
|
@ -33,10 +33,12 @@ Then run:
|
|||
- The service loads optional environment overrides from `~/.config/music-light/env`.
|
||||
- Use `make status-service`, `make logs-service`, `make restart-service`, and `make uninstall-service`.
|
||||
- Keep it as a user service because `playerctl` needs access to the logged-in desktop user's MPRIS session.
|
||||
- The running script exposes an HTTP control API for Home Assistant: `GET /status`, `POST /pause`, `POST /resume`, `POST /toggle`.
|
||||
|
||||
## Configuration
|
||||
Edit constants at the top of `luz-musica.py`:
|
||||
- `HA_URL`, `HA_TOKEN`, `LIGHT_ENTITY`
|
||||
- control API: `CONTROL_HOST`, `CONTROL_PORT`, `CONTROL_TOKEN`
|
||||
- tuning: `BRIGHTNESS_PCT`, `SATURATION_BOOST`, `MIN_SATURATION`, `MIN_VALUE`, `REQUEST_TIMEOUT`
|
||||
|
||||
## Expected behavior / troubleshooting
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue