# Status Lamp

The **StatusLamp** widget provides a simple, visual indicator of a state or condition, similar to an LED light. It displays a colored circle that can change based on the data it receives.

This widget is perfect for dashboards, monitoring screens, and any interface where you need a clear, at-a-glance indication of status, such as online/offline, success/failure, or active/inactive.

<figure><img src="https://3495989837-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FE5Ketpww1s7TauSAJrJ8%2Fuploads%2FD5MK4TR6CzAmRiKsMnVB%2FstatusLamp.gif?alt=media&#x26;token=d49e9bd1-985f-41a4-a0df-71a29bb23e22" alt=""><figcaption><p>A Status Lamp</p></figcaption></figure>

## Data Binding

Connect the widget to your application's logic by dragging the corresponding items from the Flow Builder.

### Output

| **Property** | **Type**             | **Description**                                                                                                                                                                                              |
| ------------ | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **`value`**  | `String` or `Object` | Determines the lamp's color based on the configured mappings. If a string is provided, it's matched directly. If an object is provided, the widget looks for a `status` property within the object to match. |

{% hint style="info" %}
The Status Lamp only accepts single values in the `value` field. To associate ranges of numbers to a mapping, you will first need to create the groupings.

This can be done using [Filters](https://docs.heisenware.com/building-apps/data-processing/function-extensions/filter).
{% endhint %}

## Configuration

### Settings

These properties define the mapping between status values and the lamp's appearance.

| **Label**           | **Description**                                                                | **Type** | **Property** |
| ------------------- | ------------------------------------------------------------------------------ | -------- | ------------ |
| **Status Mappings** | Defines a list of status values and their corresponding colors and hover text. | Array    | `mappings`   |

#### Status Mapping Properties

Each item in the `Status Mappings` array links a specific value to a color and an optional tooltip.

| **Label**      | **Description**                                                                                           | **Type**       | **Property** |
| -------------- | --------------------------------------------------------------------------------------------------------- | -------------- | ------------ |
| **Value**      | The specific status value from your data that will trigger this mapping (e.g., "online", "error", "200"). | String         | `value`      |
| **Color**      | The color the lamp will display when its input value matches.                                             | String (Color) | `color`      |
| **Hover Text** | Optional text that will appear in a tooltip when a user hovers over the lamp.                             | String         | `hoverText`  |

## Monitoring the status of a function

The status lamp can also be used to monitor the status of a function in the logic board.&#x20;

This is particularly useful when handling many integrations and data connections, to have an easy way to monitor whether these are active.

To link a function status to the status lamp, simply drag the status indicator to the left of the function onto the widget.

<figure><img src="https://3495989837-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FE5Ketpww1s7TauSAJrJ8%2Fuploads%2FauHm8aAd4sfL2IRbBAaU%2FLink_function_to_status.gif?alt=media&#x26;token=5ce789e9-21ec-4a4b-899a-e3dd6483a399" alt=""><figcaption></figcaption></figure>
