Lights & show
Set brightness
POST
/api/brightnessGuest area “brightness”. Open unless a PIN lock is set and guests aren't allowed this area (
settings.guest.brightness); then it needs an unlock token.Sets the master brightness, 0 to 1 (out of range is clamped).
Request body application/json
valuenumberrequired0 to 1.
0 to 1Responses
200OKapplication/json
brightnessnumber403Locked, or not allowed.application/json
errorstringrequiredWhat went wrong, in a sentence for people.
Request
curl -X POST 'http://localhost:8080/api/brightness' \
-H 'content-type: application/json' \
-d '{
"value": 0.6
}'const res = await fetch("http://localhost:8080/api/brightness", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
"value": 0.6
}),
});
const data = await res.json();
console.log(data);import requests
res = requests.post(
"http://localhost:8080/api/brightness",
json={
"value": 0.6
},
)
print(res.json())Response
{
"brightness": 0.6
}{
"error": "Settings are locked. Unlock with the PIN in Settings."
}