# Switch

The "Switch" widget allows one or more devices to be switched between two states.

<div data-full-width="true"><figure><img src="https://content.gitbook.com/content/Nyvwhz1kEMXcHf4HLuZ8/blobs/MZDED4FSrxYjcPpDqPb5/04CE2FAE-3CDD-4F28-91BB-EB4AE614825B.png" alt=""><figcaption></figcaption></figure></div>

## When should this widget be used?

Switches should be used when you want to switch an asset exclusively between two states (e.g. "On" and "Off"). A common use case is lamps.&#x20;

However, if you want to control dimmable lamps, use the widget -> Lamp control.&#x20;

## Configure Widget

{% @supademo/embed demoId="KS\_36muoBJWvH6P0wCVdI" url="<https://app.supademo.com/demo/KS_36muoBJWvH6P0wCVdI>" fullWidth="true" %}

1. Make sure you are in the "Dashboard" menu
2. Click "Add widget"
3. Click "Input"
4. Click on "Switch"
5. Select the primary asset. The name of this asset will appear in the widget title bar.
6. Select the asset you want to control via the switch.
7. (Optional) Give the asset a name
8. Select the target value
9. Select the current value
10. (Optional) Repeat the previous steps to create switches for additional assets
11. Optional: Choose how much space your new widget should take up on the dashboard.
12. Click "Add widget"

## Operate widget

### Overview

<div data-full-width="true"><figure><img src="https://content.gitbook.com/content/Nyvwhz1kEMXcHf4HLuZ8/blobs/R6TZJ7JQdDkozkDBxqLb/835BFCBA-60AF-4BF1-91A7-916FDABE925E.png" alt=""><figcaption><p>The "Switch" widget in detail</p></figcaption></figure></div>

<table><thead><tr><th width="81.33333333333331"></th><th width="275"></th><th></th></tr></thead><tbody><tr><td><strong>[A]</strong></td><td>Widget title</td><td>Title of the widget. Is influenced by the selection of the "Primary Asset".</td></tr><tr><td><strong>[B]</strong></td><td>Icon</td><td></td></tr><tr><td><strong>[C]</strong></td><td>Individual assets</td><td>The individual assets that were added to the widget</td></tr><tr><td><strong>[D]</strong></td><td>More options</td><td></td></tr><tr><td><strong>[E]</strong></td><td>Individual switches</td><td></td></tr></tbody></table>

### Operate Widget

For each individual asset added **\[C]** is its own switch **\[E]** assigned.

<figure><img src="https://content.gitbook.com/content/Nyvwhz1kEMXcHf4HLuZ8/blobs/uibJQtnIenfDOwhMt7TQ/98D43939-AC3D-414E-B546-1C9ECC35A7C5.png" alt=""><figcaption><p>Left: switch in "ON" state<br>Right: switch in "OFF" state</p></figcaption></figure>

* Click a switch that is in the "ON" state to set it to "OFF"
* Click a switch that is in the "OFF" state to set it to "ON".
