Updated JSON API (markdown)

master
Aircoookie 2019-03-27 09:38:48 +01:00
rodzic 32376b33cf
commit 6f6b69c49b
1 zmienionych plików z 14 dodań i 1 usunięć

@ -101,4 +101,17 @@ Sample JSON API response (v0.8.4):
"Magenta", "Magred", "Yelmag", "Yelblu", "Orange & Teal", "Tiamat", "April Night"
]
}
```
```
### Overview of values
#### State object
| JSON key | Value range | Description
| --- | --- | --- |
on | bool | Is the light on?
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 deprecated, it is recommended to use the range 1-255. The state response will never have the value `0` for _bri_.
transition | 0 to 255 | Duration of the crossfade between different colors/brightness levels. One unit is 100ms, so a value of `4` results in a transition of 400ms.
ps | -1 to 65535 | ID of currently set preset. 0.8.4 will always return `-1`.
pl | -1 to 0 | ID of currently set playlist. In 0.8.4 only, this sets the preset cycle feature, `-1` is off and `0` is on.