Skip to content
Stand with Ukraine flag

Status widget

  • Widget
  • v1.0.0
  • Sep 1, 2026
  • MIT license
  • v4.2+ | Built-in
Status widget

Displays current status.

Widget Type
  • Control
Category
  • Gauges & Indicators
Use Cases
  • Industrial Automation
  • Smart Building
  • SCADA

Who it’s for

Anyone who needs one square on a dashboard to say whether something is on or off, healthy or faulted, connected or not. The reader is scanning a grid of these looking for the odd one out, so the tile has to be legible as a state at a glance rather than as a value to be interpreted.

What it does

The Status widget shows a device’s current state as one of two fully styled cards — an on card and an off card, each with its own icon, label, status text and color palette. The state is fetched by whatever action you configure, so the same widget reports an attribute, a telemetry key, an RPC result or an alarm status without any of them being turned into a number first.

  • The state source is configurable rather than fixed — an attribute, a time series key, an RPC call to the device, or the alarm status of the entity all drive the same tile.
  • Two independently styled cards mean the on and off states can differ in icon, wording and color, not just in shade.
  • A separate disabled condition greys the tile out, which distinguishes “off” from “not available” — the state a single on/off tile cannot express.
  • Three layouts — the full card, a centered variant, or an icon-only tile for a dense board.
  • A parse function converts whatever the source returns into the boolean the tile draws, so a device reporting "RUNNING" needs no upstream translation.
  • Persistent RPC is supported, with a polling interval, for devices that answer asynchronously.
  • The Status widget is a read-only indicator: it displays state and never sends a command, so a tile that has to switch something belongs on one of the switch or button widgets.

How to set up

Data keys

The Status widget takes no data keys — the state comes from a configured action rather than from the datasource key list.

AttributeScopeOperationDescription
Configured keyAnyReadWith Initial state set to Get attribute, the tile reads this key and maps it to on or off. Get time series reads a telemetry key instead.
MethodDirectionParametersSent when
Configured methodTwo-way (request-response)As configuredWith Initial state set to Execute RPC, the tile calls this method on the device and maps the response to on or off.

Behavior

SettingDefaultEffect
Initial stateUnsetHow the state is fetched — Do nothing, Execute RPC, Get attribute, Get time series or Get alarm status
Parse value functionUnsetConverts the fetched value into the boolean the tile draws
Disabled stateUnsetA second action deciding when the tile is greyed out
RPC request timeoutPlatform defaultHow long an RPC state check waits
RPC request persistentOffFor devices that answer asynchronously, with a polling interval

Configure the disabled state as well as the on and off states. Without it a device that is unreachable shows its last known state indefinitely, which is the most expensive kind of wrong a status tile can be.

How to customize

  • To change where the state comes from — set Initial state to the action that matches the device, then fill in its key or method.
  • To handle a non-boolean source — supply a Parse value function mapping the returned value onto true or false.
  • To show unavailability — configure the Disabled state action, so a stale or unreachable device is visibly different from an off one.
  • To word each state — set the Label and Status text on the on and off cards separately, which is where Running and Stopped beat On and Off.
  • To fit a dense board — set Layout to Icon, or Center for a compact card that keeps its text.
  • To make the states unmistakable — give each card its own Icon and Color palette, so they differ in shape as well as in color.

Tips

  • Give the two states different icons, not just different colors. A grid of these is scanned peripherally, and a reader with any degree of color vision deficiency gets nothing from a red-versus-green pair of otherwise identical tiles.
  • Word the states in the operator’s language rather than as on and off. Pump running and Pump stopped need no interpretation; On leaves the reader to work out on what.

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.