Status
Shows the state of a device with color, icon and label. Each incoming value is matched to a state you define (value → label, color, icon, blink). Booleans work out of the box: true/false, on/off, 1/0 and yes/no.
Default on/off and unknown values
Section titled “Default on/off and unknown values”Properties
Section titled “Properties”| Property | Type | Default | Description |
|---|---|---|---|
label |
string | Status |
Name of the device |
icon |
string | Lucide icon next to the name (the tile style also uses it as the state icon) | |
style |
led · pill · tile |
led |
LED lamp and label, badge on the right, or the whole card in the state color |
states |
array | on / off | The states, see below |
Each state:
| Field | Type | Description |
|---|---|---|
value |
string | The value to match, case-insensitive. A number or boolean payload is compared as text |
label |
string | Text shown (the value when empty) |
color |
neutral · accent · success · warning · danger |
Theme color; neutral reads as off |
icon |
string | Optional Lucide icon for this state |
blink |
boolean | Blink to catch the eye (steady when the user prefers reduced motion) |
Edit the states in the node’s dialog or in the builder inspector (Behaviour → States).
msg.payload = true; // matches "true" — or "on", "1", "yes"msg.payload = 'fault'; // matches the state named faultmsg.payload = 'stuck'; // no match: shown as an unknown state, in neutral with a dashed outlinemsg.ui = { style: 'tile' };msg.ui = { states: [{ value: 'open', label: 'Open', color: 'success' }, { value: 'closed', label: 'Closed' }] };