API — Scenes
List scenes
GET /api/v1/scenes
Create scene
POST /api/v1/scenes
Content-Type: application/json
{
"name": "Evening",
"description": "Dim lighting",
"actions": [
{ "device_id": 1, "action": "on", "delay_seconds": 0 },
{ "device_id": 2, "action": "off", "delay_seconds": 2 }
]
}
Execute scene
POST /api/v1/scenes/{id}/execute
Runs each action in order with the configured delay.
Update / delete
PUT /api/v1/scenes/{id}
DELETE /api/v1/scenes/{id}
Errors
| Code | Cause |
|---|---|
| 404 | Scene not found |
| 422 | Invalid device_id in actions |