Actions
Automations
3 actions in the Automations group. Each is its own JSON-RPC method, and also runs through action.run.
automation.runRun an automation
Runs an automation now, whatever its trigger (its Run button).
Parameters
The automation. Give its id or name.
Result
automationstring (uuid)alwaysThe automation's id.
startedbooleanalways
Live state
automations.items[automation].enabled bool
On while the automation is enabled. From the automations topic. How to read it.
{
"jsonrpc": "2.0",
"id": 1,
"method": "automation.run",
"params": {
"automation": "<automation id or name>"
}
}In the SDKs
Task<AutomationRunResult> AutomationRunAsync(AutomationRunParams parameters, CancellationToken cancellationToken = default)automationRun(params: AutomationRunParams): Promise<AutomationRunResult>async def automation_run(self, *, automation: str) -> AutomationRunResultJSON Schema
{
"params_schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"automation": {
"description": "The automation. Give its id or name.",
"minLength": 1,
"type": "string"
}
},
"required": [
"automation"
],
"type": "object"
},
"result_schema": {
"additionalProperties": false,
"properties": {
"automation": {
"description": "The automation's id.",
"format": "uuid",
"type": "string"
},
"started": {
"type": "boolean"
}
},
"required": [
"automation",
"started"
],
"type": "object"
}
}automation.enableTurn an automation on or off
Turns an automation on (it runs when its trigger fires), off, or the other way.
Parameters
The automation. Give its id or name.
On, off, or toggle.
Result
automationstring (uuid)alwaysThe automation's id.
enabledbooleanalways
Live state
automations.items[automation].enabled bool
On while the automation is enabled. From the automations topic. How to read it.
{
"jsonrpc": "2.0",
"id": 1,
"method": "automation.enable",
"params": {
"automation": "<automation id or name>"
}
}In the SDKs
Task<AutomationEnableResult> AutomationEnableAsync(AutomationEnableParams parameters, CancellationToken cancellationToken = default)automationEnable(params: AutomationEnableParams): Promise<AutomationEnableResult>async def automation_enable(self, *, automation: str, mode: AutomationEnableMode | None = None) -> AutomationEnableResultJSON Schema
{
"params_schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"automation": {
"description": "The automation. Give its id or name.",
"minLength": 1,
"type": "string"
},
"mode": {
"default": "toggle",
"description": "On, off, or toggle.",
"enum": [
"on",
"off",
"toggle"
],
"type": "string"
}
},
"required": [
"automation"
],
"type": "object"
},
"result_schema": {
"additionalProperties": false,
"properties": {
"automation": {
"description": "The automation's id.",
"format": "uuid",
"type": "string"
},
"enabled": {
"type": "boolean"
}
},
"required": [
"automation",
"enabled"
],
"type": "object"
}
}variable.setSet a variable
Sets an automation variable: what {var:name} shows in a text layer and an automation's If can check. Empty forgets it. Kept by Studio across restarts.
Parameters
Its name: letters, digits, spaces and _ - . :
Its value; empty or left out forgets it.
Result
namestringalwaysvaluestringalwayscan be nullIts value now; null when forgotten.
Live state
variables.items[name].value string
The variable's value. From the variables topic. How to read it.
{
"jsonrpc": "2.0",
"id": 1,
"method": "variable.set",
"params": {
"name": "<text>"
}
}In the SDKs
Task<VariableSetResult> VariableSetAsync(VariableSetParams parameters, CancellationToken cancellationToken = default)variableSet(params: VariableSetParams): Promise<VariableSetResult>async def variable_set(self, *, name: str, value: str | None = None) -> VariableSetResultJSON Schema
{
"params_schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"name": {
"description": "Its name: letters, digits, spaces and _ - . :",
"maxLength": 64,
"type": "string"
},
"value": {
"description": "Its value; empty or left out forgets it.",
"maxLength": 4096,
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"result_schema": {
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
},
"value": {
"description": "Its value now; null when forgotten.",
"type": [
"string",
"null"
]
}
},
"required": [
"name",
"value"
],
"type": "object"
}
}
