Set switch state
set_switch_stateTurn any Domoticz smart home device on or off by providing its numeric ID or name. Specify the desired state as 'On' or 'Off' to control the device instantly.
Instructions
Set 'On'/'Off'. Preferred: idx. Cross-ref: toggle_switch.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| idx | No | Numeric Domoticz idx; preferred over name when known | |
| name | No | Case-insensitive Domoticz entity name | |
| state | Yes | Desired switch state: On or Off (case-insensitive) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | No | Optional Domoticz response title | |
| status | Yes | Status returned by Domoticz, normally OK |