You are reading the development docs (2026.12.1-dev.1): features here may not be released yet.
Skip to content

Data Grid Card ​

custom:lcards-data-grid

Data grid card: LCARS data cascade

A grid of cells in the LCARS style: columns of generated numbers that fill a panel with texture, or a table of your own text, entity states and templates.

  • Decorative: columns of generated digits, decimals, letters or hex codes, often with the classic LCARS colour cascade rolling down the rows. No entities needed.
  • Data: a table you write row by row, where each cell is text, a live entity state, a template or a data source value.

Try it

  • In the card editor, Open Configuration Studio gives you a live preview, a spreadsheet of your cells, and row, column and cell styling.
  • The Playground lets you edit data grid YAML here in the docs and see the result.

The grids on these pages are live previews drawn with the card's own code. Entities show sample values.

PageCovers
Data and CellsDecorative values, rows, what a cell can be, data sources, header rows, conditional colours, tap actions
Styling and AnimationStyle layers and keys, header style, grid layout, the cascade, highlighting changes, filters
PlaygroundEdit YAML and see the grid live
UpgradingOlder data grid configs and what they become

Quick start ​

Two grids to start from: the decorative grid the card picker adds, and a small status table.

  • The first is six rows of mixed values with the colour cascade, as the card picker adds it.
  • In the status table the first row is a header, the middle column shows each entity's state and the last column is a template.
yaml
type: custom:lcards-data-grid
data_mode: decorative
format: mixed
grid:
  grid-template-rows: repeat(6, auto)
  grid-template-columns: repeat(6, minmax(60px, 1fr))
  gap: 0px
style:
  padding: 0px
  font_size: 22px
animations:
  - trigger: on_load
    preset: cascade-color
yaml
type: custom:lcards-data-grid
data_mode: data
rows:
  - values: [System, Value, Status]
    header: true
  - [Inside, sensor.living_room_temperature, "{{ 'WARM' if states('sensor.living_room_temperature') | float > 22 else 'OK' }}"]
  - [Outside, sensor.outdoor_temperature, "{{ 'WARM' if states('sensor.outdoor_temperature') | float > 22 else 'OK' }}"]
  - [Humidity, sensor.living_room_humidity, "{{ states('sensor.living_room_humidity') | int }}%"]
grid:
  grid-template-columns: 140px 1fr 90px
  gap: 4px
style:
  font_size: 18px
columns:
  - style:
      align: left
      color: var(--lcars-orange)

Which mode should I use? ​

data_mode picks the mode: decorative for generated values, data for your own rows. When it is left out, a card with rows is a data grid and anything else is decorative.

DecorativeData
ShowsGenerated values: digits, decimals, letters or hexYour rows: text, entity states, templates, data source values
Set up withformat, the grid size in gridrows
Changes whenEvery refresh_interval ms (optional)An entity, template or data source changes
Good forFilling space with LCARS texture, backgrounds behind other cardsStatus panels, sensor tables, system readouts

Card options ​

The data grid's own top-level keys. Each has its section on a topic page; this table links to it.

  • The grid also takes the keys every LCARdS card takes (height, width, grid_options, overflow, z_index, id, tags ...): see Common card properties.
  • In a sections view the grid asks for the full width and 4 rows unless grid_options says otherwise, and never fewer than 4 columns and 2 rows.
yaml
type: custom:lcards-data-grid
data_mode: decorative
format: hex
refresh_interval: 2000 # new values every 2 seconds
refresh_cells: 0.2 # a fifth of the cells each time
grid:
  grid-template-rows: repeat(4, auto)
  grid-template-columns: repeat(8, 1fr)
  gap: 0px
style:
  font_size: 20px
  color: var(--lcars-orange)
highlight_changes: true
More about the card options
  • Masonry views: the card reports its height from a pixel height, or else from the number of rows: each row 1.5 times the grid's font_size (24px by default) plus the row gap (8px by default), in units of 50 px.
  • In a short space: rows never shrink below one line. A row is at least 1.5 times font_size plus the cell padding (4 px above and below by default), with the row gap between rows; rows that do not fit are clipped. Two 14 px rows need 66 px with the defaults, or 44 px with grid.gap: 2px and style.padding: 0.
  • Rules: the rules engine finds the grid by id and tags. A rule's style patch applies to the grid-wide style.
  • Older keys: a config with keys from earlier versions still works; see Upgrading.
KeyTypeDefaultDescription
data_modestringdata with rows, else decorativedecorative or data: see Which mode should I use?
formatstringmixedDecorative mode: the kind of value generated. See Decorative mode
refresh_intervalnumber0Decorative mode: new values every this many ms. 0 keeps them fixed
refresh_cellsnumber1Decorative mode: the share of cells that change on each refresh, 0 to 1
rowslist-Data mode: the rows of cells. See rows
cell_tap_actionaction-What tapping an entity cell does: see Tap actions
data_sourcesobject-Named data sources for {datasource:...} cells: see Data sources
triggers_updatelist-Extra entity ids whose changes re-run the templates, for JavaScript templates: see Manual tracking
gridobjectequal columns, 8px gapCSS Grid layout: see Grid layout
styleobjecttheme defaultsStyle for every cell: see Style keys
header_styleobjectheader defaultsStyle for header rows: see Header rows
columnslist-Per column, by position: style, and format in decorative mode. See Style layers
animationslist-Card animations, including the cascade-color preset: see The cascade
highlight_changesboolean / objectoffAnimate cells whose value just changed: see Highlighting changes
filterslist-CSS filters on the whole grid: see Filters

Released under the MIT License. | About