Card overview¶
Every card has two basic jobs: choose the Home Assistant information it can use, and describe what should be shown on the card. Those two parts are configured with entities: and layout:.
This page introduces that basic card structure, shows how tools select an entity, and points to the main tool groups you can add to a layout.
Basic card structure¶
A card combines its data sources under entities with the visible items under layout.
entities: contains the Home Assistant entities and local values used by the card.
layout: contains everything that appears on the card.
Add the information you need¶
A card can use one or many entities:
Use entity_index to choose which entity an item uses:
Add something to the card¶
Choose the tool that matches what you want to show or control:
| You want to... | Use |
|---|---|
| Show a current value, name, area, or icon | Entity information |
| Show a value on a gauge | Horseshoe |
| Show history | Sparkline |
| Add a background, border, separator, or other shape | Shapes |
| Change a value or run an action | Controls |
Change the card shape¶
A square card is the normal starting point. Use layout.aspectratio when the card should be wider or taller:
See Positioning and sizing for the card coordinate system and aspect ratio.
Place another card inside the card¶
Use root-level cards: to position normal Lovelace cards inside the Flexible Horseshoe Card. The child keeps its own normal card configuration; add xpos, ypos, width, and height only to tell the parent where that child should appear.
zpos changes the stacking order; when omitted, child cards keep their list order. frameless defaults to true, which removes the child's normal card background, border, and shadow where the card exposes them; set frameless: false to keep that shell.
A child whose type is custom:flex-horseshoe-card is put in embedded mode by default. Set embedded: false on that child when it should keep its normal standalone-card behavior. Other child-card fields are passed to that card as normal Lovelace configuration.
Child card placement reference¶
These fields belong to each item under root cards:. They position the child; they are not passed to the child card itself.
Required applies to the specific form described by that table: Yes means you need the field for that form; No means you can leave it out. Not set means the card adds no explicit value when the option is omitted.
| Option | Type | Required | Default | Description |
|---|---|---|---|---|
xpos | number | Yes | — | Horizontal centre of the child in the parent's logical coordinate space. |
ypos | number | Yes | — | Vertical centre of the child in the parent's logical coordinate space. |
width | number | Yes | — | Width reserved for the child. |
height | number | Yes | — | Height reserved for the child. |
zpos | number | No | List position | Stacking order. Larger values appear above smaller values; equal values keep list order. |
frameless | boolean | No | true | true removes the normal child-card shell where possible; false keeps it. |
embedded | boolean | No | true for Flexible Horseshoe Card children | Controls embedded mode for a child Flexible Horseshoe Card; set false to keep its standalone behavior. |