跳至内容

Board 模板

一个紧凑的仪表板,将最多四个带标签的磁贴并排显示。每个磁贴包含一个数值、可选单位、图标、颜色、趋势箭头,以及各自的点按目标 — 非常适合一目了然地呈现多个相关指标。

Live Activity 演示

Fields

FieldTypeDescription
templatestringRequired. Must be "board"
tilesarrayRequired. 1–4 tile objects (see below). More than four are dropped to fit the layout
titlestringBoard heading shown above the tiles
statestringStatus text shown beside the title (e.g. "All systems nominal")
iconstringSF Symbol name (e.g. "server.rack") or MDI icon with mdi: prefix
accent_colorstringNamed color or hex used for the heading icon and tile values. Default: blue
background_colorstringBackground color override
text_colorstringText color override

Tile object

Each entry in tiles is an object:

FieldTypeDescription
labelstringRequired. Tile caption. Max 32 characters
valuestringRequired. Primary value. Max 16 characters
unitstringUnit suffix shown after the value (e.g. "%", "GB"). Max 8 characters
iconstringSF Symbol or MDI icon shown beside the label
colorstringNamed color or hex for this tile's value. Falls back to accent_color
trendstringOne of up, down, flat — renders a trend arrow
url_actionobjectPer-tile tap target. Same shape as tap actions
信息

Send 1 to 4 tiles. The board fits inside the same ~4 KB APNs payload as every other template, so keep labels and values short — long strings are truncated to the limits above.

Example: Service Status Board

服务状态看板
{
  "state": "ongoing",
  "content": {
    "template": "board",
    "title": "Homelab",
    "state": "All systems nominal",
    "icon": "server.rack",
    "accent_color": "green",
    "tiles": [
      { "label": "Uptime", "value": "99.98", "unit": "%", "icon": "checkmark.circle", "color": "green", "trend": "flat" },
      { "label": "CPU", "value": "47", "unit": "%", "icon": "cpu", "color": "cyan", "trend": "up" },
      { "label": "Memory", "value": "6.2", "unit": "GB", "color": "blue" },
      {
        "label": "Errors",
        "value": "3",
        "unit": "/h",
        "icon": "exclamationmark.triangle",
        "color": "orange",
        "trend": "down",
        "url_action": { "url": "https://grafana.example.com/errors", "foreground": true }
      }
    ]
  }
}

Typical Flow

  1. Start the board (ended -> ongoing): Send the initial set of tiles
  2. Update tiles (ongoing -> ongoing): Re-send the tiles array with new values — the board redraws in place
  3. Finish (ongoing -> ended): Optionally send a final snapshot, then end the activity

Buttons & tap targets

Each tile can carry its own url_action, so a single board can deep-link to several destinations — one per metric. See Tap actions for the action object shape.

Use Cases

  • Infrastructure — uptime, CPU, memory, and error-rate at a glance
  • Smart home — room temperatures, energy use, device states
  • Media servers — active streams, queue depth, transcodes, library size
  • Sports & finance — scoreboards, portfolio tickers, KPI dashboards