> For the complete documentation index, see [llms.txt](https://docs.kiloiot.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kiloiot.io/dashboards/adding-widgets/control-widget.md).

# Control Widget

Control a device from a Kilo dashboard with a Switch, Button, Slider, or Input widget bound to a device command.

Most widgets report. The **Control widget** acts. It puts an interactive control on your dashboard — a **Switch**, **Button**, **Slider**, or **Input** — bound to one of a device's commands, so an operator can change the device's state right next to the readings that tell them whether they need to. It is the dashboard face of [Device Commands](/devices/commands.md): the command does the work, the widget is the control surface.

<figure><img src="https://2057878315-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtNQh1wBSHSaknslMdOXm%2Fuploads%2Fgit-blob-0702697efe08122656cf039c800b53448e01736f%2Fcontrol-dashboard.jpg?alt=media" alt="A dashboard of Control widgets — a switch, a dial, a slider, and an input controlling a lamp"><figcaption></figcaption></figure>

## Prerequisite — define a command first

A Control widget operates an existing **device command**, so the device must already have one defined on its **Commands & States** tab. If a device has no commands it won't appear in the picker (you'll see *"No controllable devices in this organization"*). Set the command up first — see [Creating Commands](/devices/commands/creating-commands.md) — then bind the widget to it.

## Shared setup flow

Every Control widget is created the same way; only the **Appearance** fields differ by type.

1. Open the dashboard in **edit mode** and click **Add widget** → **Control**.
2. On the **Datasource** tab (*"Control configuration"*), choose the **Source** (Device) and the **Device**, then pick the **Device metric** — the reading that reflects the device's current state. Click **Next**.
3. On the **Appearance** tab, enter a **Widget name** (required) and optional **Description**, then choose a **Widget type** (below). Fill in that type's fields and click **Save**.

## Choose a control type

| Type                                                                            | Best for                                               | Sends                                        |
| ------------------------------------------------------------------------------- | ------------------------------------------------------ | -------------------------------------------- |
| [Switch](/dashboards/adding-widgets/control-widget/switch.md)                   | A persistent two-state condition (on/off, open/closed) | An on or off command as you toggle           |
| [Button](/dashboards/adding-widgets/control-widget/button.md)                   | A one-shot action (reset, open, start)                 | A single command per press                   |
| [Simple Slider](/dashboards/adding-widgets/control-widget/slider-simple.md)     | A numeric value on a horizontal track                  | A command parameter as you slide             |
| [Circular Slider](/dashboards/adding-widgets/control-widget/slider-circular.md) | A numeric value on a radial dial                       | A command parameter as you turn the dial     |
| [Vertical Slider](/dashboards/adding-widgets/control-widget/slider-vertical.md) | A numeric value on an upright track                    | A command parameter as you slide             |
| [Input](/dashboards/adding-widgets/control-widget/input.md)                     | An exact typed value                                   | A command parameter when you press **Apply** |

The three sliders are the **Slider type** options — **Simple**, **Circular**, and **Vertical** — that you pick after choosing **Slider** as the widget type.

## How it behaves

* **Operate from the dashboard.** Using the control dispatches the bound command through the same pipeline as the device's States tab — same validation, delivery, and execution history.
* **Reflects real state.** The widget reads the **Device metric** and shows the current state, so it stays in sync with the device rather than just remembering the last action.
* **Disabled when it can't act.** If the device is offline or the binding is incomplete, the control is shown disabled rather than sending into the void.

## See also

* [Device Commands](/devices/commands.md) — define and manage the commands a Control widget operates
* [Creating Commands](/devices/commands/creating-commands.md) — set up the command to bind
* Control types: [Switch](/dashboards/adding-widgets/control-widget/switch.md) · [Button](/dashboards/adding-widgets/control-widget/button.md) · [Simple Slider](/dashboards/adding-widgets/control-widget/slider-simple.md) · [Circular Slider](/dashboards/adding-widgets/control-widget/slider-circular.md) · [Vertical Slider](/dashboards/adding-widgets/control-widget/slider-vertical.md) · [Input](/dashboards/adding-widgets/control-widget/input.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.kiloiot.io/dashboards/adding-widgets/control-widget.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
