Scenes & schedules

Change a schedule

PUT/api/schedules/{id}
Admin. Needs an unlock token (x-tempolight-token) while a PIN lock is set; without a lock, anyone can call it.

Changes the fields given; the others are kept.

Path parameters

idstringrequired

A schedule id (t…).

Request body application/json

namestring
Up to 60 characters
timestring

HH:MM, or sunrise/sunset with an optional offset in minutes (needs a location in Settings).

daysinteger[]

Weekdays, 0 = Sunday.

actionobject
enabledboolean
Default true

Responses

200OKapplication/json
idstringrequired

t…

nextstring | null <date-time>

The next time it runs (ISO).

namestring
Up to 60 characters
timestring

HH:MM, or sunrise/sunset with an optional offset in minutes (needs a location in Settings).

daysinteger[]

Weekdays, 0 = Sunday.

actionobject
enabledboolean
Default true
400The body isn't valid JSON, or a value is wrong.application/json
errorstringrequired

What went wrong, in a sentence for people.

403Locked, or not allowed.application/json
errorstringrequired

What went wrong, in a sentence for people.

404No such id.application/json
errorstringrequired

What went wrong, in a sentence for people.

Request
curl -X PUT 'http://localhost:8080/api/schedules/t8f2k1' \
  -H 'content-type: application/json' \
  -d '{
  "enabled": false
}'
Response
{
  "id": "t8f2k1",
  "name": "Evening",
  "time": "sunset+30",
  "days": [
    1,
    2,
    3,
    4,
    5
  ],
  "action": {
    "type": "scene",
    "scene": "chill"
  },
  "enabled": true,
  "next": "2026-11-04T17:12:00.000Z"
}
Edit on GitHub