# Add more feedback to a button

> Stack several feedbacks on one button, show a device image or a live value, test a variable with an Expression feedback, and generate a feedback per dropdown choice.

[Create your first button](/docs/buttons/v1.10/positions/create-your-first-button) covers adding one feedback. This page covers the three kinds of feedback, stacking several feedbacks on the same button, showing a device's image or a live value, testing a variable's own value as a feedback, and generating a feedback per choice the same way you can with actions.

Each button on this Stream Deck Studio uses one technique from this page:

![A Stream Deck Studio showing the buttons built on this page: Cam 1 with a green context bar and red background, a media pool still behind the text Still 1, a Master button showing the live level -100, a red Evening button, and a second row of repeated input buttons with Camera 1 lit red](https://bitfocus.io/api/docs-media/file/sds-feedback-buttons.png?prefix=docs-media)

## Before you begin

- A button with at least one feedback added. See [Create your first button](/docs/buttons/v1.10/positions/create-your-first-button).

## Know which kind of feedback you have

The connection module defines each of its feedbacks as one of three types, and the type decides what the feedback can do on a button:

| Type | What it can do | Where you add it |
| --- | --- | --- |
| Boolean | On or off. When on, it applies the **Button Content** and **Button Styling** you set on it. | **Feedbacks** tab, or as a Feedback variable that holds `true` or `false`. |
| Advanced | Any result counts as on, so your styling applies. If the result includes an image, such as a thumbnail, that image is shown on the button. | **Feedbacks** tab only. |
| Value | Reports a value such as a level, timecode, or name. It can't change styling on its own. | As a Feedback variable on the **Variables** tab, never on the **Feedbacks** tab. |

**+ Add Feedback...** on the **Feedbacks** tab only lists boolean and advanced feedbacks, and the Feedback variable picker only lists boolean and value feedbacks. If a feedback you expect isn't in one list, look for it in the other.

Two of Buttons' own feedbacks report more than on or off. From Buttons 1.8.11, a Feedback variable on **TSL Input** with **Read** set to **Label** holds the label text, see [Read a received channel directly with the TSL Input feedback](/docs/buttons/v1.10/tally/tsl-umd#read-a-received-channel-directly-with-the-tsl-input-feedback), and one on **Tieline Available Relation Count** holds the number of free Relations, see [Show free Relations on a button](/docs/buttons/v1.10/routing/tielines#show-free-relations-on-a-button). Every other internal feedback gives `true` or `false`.

## Stack more than one feedback

A button can hold as many feedbacks as you need, each independently active or inactive, each overriding its own set of **Button Content** and **Button Styling** fields when active. This is how a single button reflects more than one piece of state at once: for example, one feedback that sets **Context Background Color** when a source is on preview, and a second that sets **Background Color** when the same source is on program, letting both states show simultaneously on a three-line layout.

![The Feedbacks tab of a Cam 1 button with two ATEM feedbacks, ME: One ME preview source and ME: One ME program source, both active. The selected preview feedback shows a lit indicator and a Preview of the button with a green context bar, while the button at the top shows both states: green context bar and red background](https://bitfocus.io/api/docs-media/file/stacked-feedbacks.png?prefix=docs-media)

A lit bulb next to the feedback's name and its **Preview** means the feedback is active right now.

Later feedbacks in the list are evaluated after earlier ones, so if two active feedbacks both target the same field, the one lower in the list wins.

## Keep the Design labels while a feedback is on

While a feedback is active, every **Button Content** field it sets replaces the same field from the **Design** tab, and every field it leaves empty keeps the Design value. A feedback that sets its own **Context** or **Text** shows that label for as long as it's on, even after you rename the button on the **Design** tab.

A feedback added with **+ Add Feedback...** starts with only red background colors, so it shows the Design labels. Feedbacks can arrive with labels of their own, though: a preset can store its category or its own text on each feedback, and copying or duplicating a button keeps whatever its feedbacks hold.

In a feedback's **Button Content**, a field the feedback sets has a blue label with a dot next to it. To make the feedback show the Design label again, select the clear (x) button at the end of its **Context** or **Text** field. Only fill these fields in when the button should read differently in that state, for example `MUTED` instead of `MUTE`.

## Show an image from the device

Some advanced feedbacks return an image, such as an ATEM's media pool still or a media server's clip thumbnail. Add one like any other feedback:

1. On the button's **Feedbacks** tab, select **+ Add Feedback...** and choose the feedback, for example the ATEM **Media pool: Preview image** feedback.
2. Set the feedback's options, such as which media pool slot to show under **Source**. **Crop** and **Position** set how the image fits the button.
3. Check the button on the surface: the device's image fills the button behind its icon and text.

![The Media pool: Preview image feedback on a Still 1 button. The button at the top of the inspector shows the media pool still behind its text, while the feedback's own Preview shows only the text on black. Below are the Source, Default to clip, Crop, Position and Show status text options](https://bitfocus.io/api/docs-media/file/media-pool-feedback.png?prefix=docs-media)

The image also shows on the button at the top of the inspector and on the canvas, but not in the feedback's own **Preview**.

Your own **Button Content** and **Button Styling** settings on that feedback still apply while it's on. Text, colors, and sizes that the module itself returns are not applied, so set the styling you want on the feedback yourself.

<callout color="gray" title="Note">
  Some modules only load images when the connection starts. If a thumbnail feedback shows nothing at first (Resolume's **Clip Info / Show Thumbnail** is one example), restart the connection.
</callout>

## Show a live value from the device

Value feedbacks, such as an audio level or a timecode, report a value instead of on or off. To show one on a button, store it in a Feedback variable on the button, then put that variable in the button's text:

1. On the button's **Variables** tab, add a **Self** variable and give it a **Name**, for example `masterlevel`.
2. Set **Type** to **Feedback**, then pick the feedback under **Feedback**, for example the ATEM **Fairlight Audio: Master level** feedback, and set its options, such as **Meter**. Select **Create**.

![The Add Variable dialog with Name set to masterlevel, Type set to Feedback, the Fairlight Audio: Master level feedback from the Mini connection picked under Feedback, and its Meter option below](https://bitfocus.io/api/docs-media/file/feedback-variable-dialog.png?prefix=docs-media)

3. On the **Design** tab, put the variable in the button's text: `$(self.state.masterlevel)`.

![The Design tab of the button with Context set to Master and Text set to $(self.state.masterlevel), and the button at the top showing the live value -100](https://bitfocus.io/api/docs-media/file/variable-in-text.png?prefix=docs-media)

The text updates live as the device reports new values. A Feedback variable is read-only: actions can't set it, because the next result from the feedback would overwrite it. You can also use it in an expression, for example in an **Expression** feedback that turns the button red above a threshold. Boolean feedbacks can drive a Feedback variable the same way, holding `true` or `false`.

See [Understand variable scope](/docs/buttons/v1.10/variables/understand-variable-scope) for how Self variables work.

## Test a variable directly as feedback

The Internal **Expression** feedback isn't tied to any connection: it evaluates an expression you write against any variable and reports true or false, the same way a connection's own feedback would. Use it for logic a connection doesn't expose directly, such as checking the current hour or comparing two variables.

For example, this expression is true from 18:00 onwards, so the Evening button on the Stream Deck above turns red in the evening:

```
dateHour(unixNow()) >= 18
```

The result of the expression appears under it as you type, such as `= true`, so you can confirm it evaluates correctly before relying on it. See the [expressions reference](/docs/buttons/v1.10/reference/expressions) for the functions you can use.

![An Expression feedback on an Evening button with the expression dateHour(unixNow()) >= 18, the result = true below it, a lit active indicator, and the button shown in red](https://bitfocus.io/api/docs-media/file/expression-feedback.png?prefix=docs-media)

Like any other feedback, it has a **Preview**. Hold **Test** to see the button as if the feedback were active, whatever the expression's result.

## Generate a feedback per choice

When a feedback's own field is a dropdown of choices, its **...** menu offers **Create Button Repeater from choices**, the same as an action's dropdown does. This is how a repeated set of buttons gets matching feedback: for example, repeating an ATEM's **Set Program input** action across every input, then repeating its **ME: One ME program source** feedback the same way, so each generated button both switches to its own input and lights up when that input is actually live.

![The Input option of an ME: One ME program source feedback with its ... menu open, showing Create Button Repeater from choices](https://bitfocus.io/api/docs-media/file/create-repeater-from-choices.png?prefix=docs-media)

Both repeaters need to reference the same option list (for example, both keyed off the connection's own input list) to stay aligned button for button. The **Repeater** tab's **Data Sources** list shows every action and feedback repeater feeding the current layout together, so you can confirm they're aligned, see [Build more capable button actions](/docs/buttons/v1.10/positions/button-actions#generate-a-row-of-buttons-from-one) for the full repeater mechanics, including the `$(self.repeatIndex)`/`$(self.repeatDataId)`/`$(self.repeatDataLabel)` variables and the **Customize Data & Labels** editor.

![The Repeater tab's Data Sources list with an action repeater (ATEM, ME: Set Program input, option Input) and a feedback repeater (ATEM, ME: One ME program source, option Input), followed by Customize Data & Labels and the Direction setting](https://bitfocus.io/api/docs-media/file/repeater-data-sources.png?prefix=docs-media)

Feedback repeaters don't have an encoder-selector equivalent: encoder selection is an action-only concept, since it drives what an encoder's turn does, not what a button displays.

## If you get stuck

| What you see | What to try |
| --- | --- |
| A renamed button goes back to its old label whenever a feedback is on. | The feedback has its own **Context** or **Text**. Clear them in the feedback's **Button Content**, see [Keep the Design labels while a feedback is on](#keep-the-design-labels-while-a-feedback-is-on). |
| Two feedbacks conflict on the same styling field. | Check their order in the list: a later feedback overrides an earlier one's value for the same field when both are active. |
| A repeated feedback doesn't match up with its repeated action. | Confirm both repeaters are built from the same option list, see the **Data Sources** list on the **Repeater** tab. |
| A feedback you want isn't listed under **+ Add Feedback...**. | It's probably a value feedback. Add it as a Feedback variable on the **Variables** tab instead (see [Show a live value from the device](#show-a-live-value-from-the-device)). |
| A device image doesn't show on the button. | Check the surface itself: the feedback **Preview** doesn't show feedback images. If the surface is blank too, restart the connection, since some modules only load images when the connection starts. |
| The device's own text or colors don't appear on the button. | Buttons applies only the image from an advanced feedback. Set the text and colors on the feedback yourself. |
| An Expression feedback never turns true. | Check the result shown under the expression, such as `= false` or `= ERR`, and confirm the variable it references is actually populated. |

## Where to go next

- [Build more capable button actions](/docs/buttons/v1.10/positions/button-actions), for steps, groups, conditional logic, repeaters, and encoders.
- [Button Inspector reference](/docs/buttons/v1.10/reference/button-inspector), for every field on the Feedbacks and Repeater tabs.
- [Understand variable scope](/docs/buttons/v1.10/variables/understand-variable-scope), for what a variable in an expression can actually see.
