Skip to content

Stat

Displays one value prominently with its unit and a sparkline of recent history. Crossing a threshold changes its color and shows a badge.

Property Type Default Description
label string Value Title shown above the value
unit string Unit after the value
decimals number 1 Decimal places for numbers
warn number Value at or above which the stat turns amber
alarm number Value at or above which the stat turns red
icon string Lucide icon before the label
sparkline boolean true Show the recent-history line (hidden automatically when narrow)
msg.payload = 24.3; // number: formatted with decimals, added to the sparkline
msg.payload = 'RUNNING'; // text: shown as-is

The last 40 numeric values are kept on the server for the sparkline.