Skip to main content

API — Automations

List automations

GET /api/v1/automations

Create automation

POST /api/v1/automations
Content-Type: application/json

{
"name": "Night off",
"is_active": true,
"trigger_type": "time",
"trigger_config": {
"time": "22:00",
"days": ["mon", "tue", "wed", "thu", "fri", "sat", "sun"]
},
"action_type": "scene",
"action_config": {
"scene_id": 1
}
}

Device trigger example

{
"trigger_type": "device",
"trigger_config": {
"device_id": 3,
"status": "online"
},
"action_type": "device",
"action_config": {
"device_id": 5,
"action": "off"
}
}

Update / delete

PUT /api/v1/automations/{id}
DELETE /api/v1/automations/{id}

Notes

  • Time-based automations are evaluated every minute on the server
  • is_active: false pauses execution without deleting the rule