set_power
Turn any Tuya or Smart Life device on or off directly over your local network, with optional datapoint override for custom relay switches.
Instructions
Turn a device on or off.
switch_dp overrides the datapoint carrying the relay/switch. Leave it
unset to let tinytuya pick, which is correct for the large majority of
plugs, switches and bulbs.
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": {
"device": "<device>",
"on": "<on>"
},
"name": "set_power"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| on | Yes | ||
| device | Yes | ||
| switch_dp | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||