tuya_toggle_device
Toggle any Tuya or Smart Life device on or off using its device ID or name. Automatically switches the device to the opposite state.
Instructions
Toggle a Tuya device on/off by device_id or name (e.g. 'Living Room Light'). Turns it on if off, turns it off if on
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_id": "<device_id>"
},
"name": "tuya_toggle_device"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| device_id | Yes | ||
| switch_code | No | switch_1 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |