Multi-state LED status indicator
Colored status lamps for relays, digital inputs and machine states on a ThingsBoard dashboard. Map any boolean, string or number - up to 12 devices on one card.
A status led indicator for every bound key — color, icon, label and blink driven by rules you build in a drag-to-reorder editor, with no parse function to write.
Which dashboards need more than two states?
Operators and dashboard builders reading a bank of relays, digital inputs, or any status field with
more than two states need to tell each channel’s condition in one look. They ask “is this channel
on, off, or somewhere in between — and which one needs attention?” The reading might arrive as a
boolean, a status string such as run/idle/fault, or a plain number, and on a SCADA or
industrial screen all three kinds usually sit side by side.
How do I show a red, amber or green status lamp on a dashboard?
A pump reporting 1 lights green as On. A valve reporting 0 lights grey as Off. A motor reporting
2 matches neither row, so it falls back to a grey lamp labeled with the raw value 2 — a sign to
add a third state for it, not a bug.
- Maps any boolean, string or numeric reading to a colored lamp with an icon, a label and an optional blink, through rows built in a drag-to-reorder editor — no scripting.
- Carries up to ten keys per device and up to twelve devices on the same strip, so one card can cover a whole relay panel or a line of machines.
- A verdict chip reports the highest-priority state on the card — the topmost row any lamp matched — and a footer counts channels, matches and stale readings.
- With several devices, each lamp is captioned with the device it belongs to rather than the key they
all share, so three machines all reporting
activestill read as three separate lamps. - Reads its real card background rather than assuming the platform theme, so a darkened card on a light dashboard keeps legible text.
- Replaces the built-in Led indicator once two states are not enough — that widget needs a boolean and a hand-written parse function for anything else, while this card maps the value as it arrives.
- Shows the current state of each key, not its history; chart the same key elsewhere for a trend.
How do I turn a boolean, a string or a number into a colored lamp?
Data keys
| Key | Role | Type | Description |
|---|---|---|---|
| Data key (any name, one per lamp) | Main value | Timeseries or Attribute | Boolean, string or numeric latest value. Bind up to 10 keys on one device, or spread keys across up to 12 devices for a strip |
The card tells three empty cases apart rather than lumping them together. With nothing bound, it asks for a key. With a key bound that has never reported, it says it is waiting and names the key. With a key holding a JSON object or array, it says so instead of guessing at a value.
States
Each row in States is one lamp condition. Fill in Value for an exact, case-insensitive match, or leave it empty and fill in Range from / Range to for a numeric band. Label draws under the lamp, Color sets the lamp, Icon draws inside it, and Blink pulses it. Row order is priority: the first matching row wins, and the verdict chip reports the topmost row any lamp matched.
How do I change the states, colors, icons and labels?
- To map your own states — open States and add a row, then drag it to the position that gives it the right priority.
- To control what an unmatched value looks like — set Label for an unmatched value (blank shows the raw reading), Color for an unmatched value and Icon for an unmatched value.
- To use a round or square lamp — change Lamp shape.
- To hide the icon or the label inside and under the lamp — turn off Show the state icon or Show the state label. The lamp’s color still carries the reading either way.
- To remove the glow halo — turn off Glow effect.
- To catch a device that has gone silent — set Dim the lamp after (minutes). A lamp whose
value has not updated in that long is dimmed, stops blinking and counts toward the footer’s stale
total. It ships at
0, off, because attributes can legitimately stay unchanged for days. - To hide the caption above each lamp — turn off Show the data key name. With one entity the caption is the key’s own name; with several it becomes the device name, and the key name too only if the keys differ.
- To hide the verdict chip — turn off Show the verdict chip. The head still shows what the card is watching.
- To hide the footer — turn off Show the footer. The reading’s age goes with it, since the freshness stamp sits on the same row.
- To rename the footer count — set Word for one channel and Word for several channels, so
3 channelscan read3 relaysor3 pumps. - To match your dashboard’s fonts — set State label font, Entity name font and Data key name font.
What is worth knowing once it is running?
- Drag the state that most needs attention — usually Fault — to the top of the list. The verdict chip and the footer both report the highest-priority row that matched, so its position decides what the whole card leads with.
- Raise an alarm on the same key at the same value that trips your Fault row, so a channel that goes bad gets noticed even by someone who is not watching the dashboard.
Share Your Widget with the Community
Built a custom widget? Export it as a JSON from ThingsBoard and publish it to the IoT Hub through a simple 4-step wizard (Upload, Listing, Readme, Review & Submit). Share it with thousands of ThingsBoard developers worldwide and get featured in the catalog.