> For the complete documentation index, see [llms.txt](https://docs.xenioo.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.xenioo.com/actions-and-operations/iot/xenioo.bots.actions.base.devicestateconditionaction.md).

# Device State Switch

This action can switch the current flow based on the configured device state event. Use this action to react to device specific events on your channel.

![](/files/-LfnQp0VzNOO_bXL_kqy)

### Settings

The action uses the following settings:

| Setting          | Description                                                                             | [Parsed](/actions-and-operations/dynamic-parsing.md) |
| ---------------- | --------------------------------------------------------------------------------------- | ---------------------------------------------------- |
| State            | The device state you want to control                                                    | :no\_entry:                                          |
| Custom State Key | The custom state key value you want to control when you select a custom state condition | :white\_check\_mark:                                 |
| Criteria         | The criteria you would like to apply to the control switch.                             | :no\_entry:                                          |

### Remarks

This action has no remarks

### Trigger

On Condition Met. This action will trigger any child operation as the selected privacy flag meets the set criteria.

### Variables

This action does not produce any variable.

### 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).
