# Control Device State

Use this action to send channel specific commands that can modify the current channel device state.

![](/files/-LfnLgU8SpO_uiYTM6yg)

### Settings

The action uses the following settings:

| Setting         | Description                                                                                                                                        | [Parsed](/actions-and-operations/dynamic-parsing.md) |
| --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- |
| Device State    | The device state you want to set on the target device. Connect will automatically translate the selected state to the relevant flag for the device | :no\_entry:                                          |
| Custom Mode Key | A custom key that you want to send to the device. Can be set only when Device State is set to Custom                                               | :white\_check\_mark:                                 |

### Remarks

Connect will send the selected device state regardless of the current device state. Depending on specific device executions, you may need to choose when to send a specific state request.

Some states may not be supported on specific channels and devices. If the device or channel do not support a state the action will be ignored.

### Trigger

This action has no triggers.

### Variables

This action produces the following variables when executed:

| Variable                 | Description                                  |
| ------------------------ | -------------------------------------------- |
| device\_state\_directive | The base value for the selected device state |

### Availability

Channel specific availability follows the table below:

| Channel          | Availability     |
| ---------------- | ---------------- |
| Facebook         | Fully Available. |
| WhatsApp         | Fully Available. |
| Telegram         | Fully Available. |
| Web              | Fully Available. |
| Alexa            | Fully Available. |
| Google Assistant | Fully Available. |
| Slack            | Fully Available. |
| API              | Fully Available. |

This action can be used only at [Bot Global level](/actions-and-operations/execution.md#global-and-local-actions) or [Behavior level.](/actions-and-operations/execution.md#global-and-local-actions) This action is available only to [Premium Accounts](/basic-concepts/your-account/the-free-plan.md).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mylinkconnect.com/actions-and-operations/iot/xenioo.bots.actions.base.controldevicestateaction.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
