Skip to content

Visual Editors

tempus2016 edited this page Aug 18, 2026 · 8 revisions

Visual Editors

Both cards have point-and-click editors, so you can build and use templates without writing YAML by hand.


The template editor

Add a Custom: Decluttering Template Plus card to a view (+ Add card, search declutter). Its editor has a tab strip:

The template editor Settings tab, with a live preview underneath

Settings

Field Meaning
Template to define The name other cards will use. Must be unique on the dashboard.
Type of thing to template Card, Badge, Row or Element. Switching this swaps the body for a starter of the new type.
Variables The template's default values, as a YAML list — - name: value per line.

Underneath is a live preview, outlined in blue and labelled with the template name, rendered from the defaults. Give every variable a default and the preview shows you what you are building as you type.

Card

When the type is Card, a second tab gives you Home Assistant's own card editor for the body:

The Card tab showing the standard tile card editor

You get the real editor for whichever card type you chose — entity pickers, feature pickers, interaction settings, the lot. Show code editor at the bottom left drops to YAML whenever the visual editor cannot express what you want, which is where you put your [[variables]].

"Unknown entity selected" is normal here. The entity field shows [[light]], which is a placeholder, not an entity. The editor does not know that. Ignore the warning — the preview below shows the real card built from your defaults.

Change card type

Swaps the template body for a different card type, using the standard card picker.

Row

When the type is Row, you get Home Assistant's row editor instead.

Badge and Element templates have no dedicated tab — edit them under Settings → Show code editor.


The card editor

Add a Custom: Decluttering Card Plus card to use a template:

The card editor with a template dropdown, variables field and live preview

Field Meaning
Template to use Dropdown of every template available to this dashboard, sorted. You can also type a name that does not exist yet.
Variables The values to substitute, as a YAML list — - name: value per line.

The preview updates as you type.

The dropdown includes templates defined in decluttering_templates, templates defined as cards on any view, and templates borrowed from other dashboards. Borrowed ones appear a moment later, once the other dashboard has been read — the editor will not flag a template name as unknown while that is still in flight.

Validation

Message Cause
No template exists with this name Typo, or the template is on a dashboard you have not borrowed from
The list of variables must be an array of key and value pairs You wrote a mapping instead of a list — every entry needs a leading -

Editing rows and elements

Rows and picture elements have no card picker entry, so add them in YAML:

  1. Add (or open) an Entities or Picture Elements card.
  2. Click Show code editor.
  3. Add the entry to entities: or elements: as shown in Rows / Elements.

The template itself can still be built with the visual template editor.


When you would rather use YAML

Everything the editors do is plain configuration. ⋮ → Raw configuration editor on the dashboard gives you the whole thing at once, which is usually faster for defining several templates — see Defining Templates.


Defining Templates · Using Templates

Clone this wiki locally