upsert_preset
Create or replace a validated Tuya or Smart Life lighting preset for a single setting or multi-target scene, so saved configurations can be reused without cloud dependence.
Instructions
Create or replace a preset. The config is validated before saving.
Single setting: {"temp": 20, "brightness": 50, "description": "optional"} {"rgb": [255, 0, 128], "brightness": 80} Scene: {"targets": {"ceiling": {"on": false}, "setup": {"rgb": [255, 0, 128], "brightness": 80}, "bed": {"temp": 0, "brightness": 15}}} Keys per setting: on, brightness (1-100), temp (0-100), rgb. temp and rgb are exclusive.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>",
"config": "<config>"
},
"name": "upsert_preset"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| config | Yes |