Create or overwrite a script config
automations_set_script_configCreate or overwrite a script's stored YAML config and reload scripts. Replaces the whole config at a given ID, creating a new script if the ID is unused.
Instructions
Create or overwrite a script's stored YAML config, then reload scripts.
Posts config to /api/config/script/config/<id>, replacing the whole
stored config at that id (or creating a new script if the id is
unused), then calls the script.reload service.
Not for: running the script — use automations_run_script.
Returns: dict {"status": "saved", "script_id", "result"}.
Errors: returns {"error": "config must be a dict"} when config
isn't a dict, or {"error": "config must contain at least 'alias' or 'sequence'"} when both are missing.
Limits: no confirm parameter; an existing script at script_id is
replaced without a prompt.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| config | Yes | Full script config replacing whatever is stored at `script_id` (sequence, fields, alias, mode). Must contain at least 'alias' or 'sequence'. | |
| script_id | Yes | Script id to create or replace, bare (e.g. 'goodnight') or prefixed ('script.goodnight'). An id that does not exist yet creates a new script. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||