Decluttering Card Plus Contents ↓ GitHub ↗

Sharing a Template

Sharing Between Dashboards covers reusing your own templates across your own dashboards. This page is about handing one to somebody else — a forum post, a Discord message, a gist — and taking one somebody hands you.

A template card’s visual editor has a Share tab. The top half writes the template out as YAML; the bottom half takes YAML in.

The Share tab of the template editor


Exporting

Open the template card in the editor, go to Share, and copy what is in the Export box. Copy to clipboard does it in one click.

A template is only ever as portable as the things it is built from, and YAML on its own cannot tell you what those are — so the export says, in comments:

# Requires these custom cards: custom:mushroom-template-card
# Uses these other templates, which are not included here: my_button_base
type: custom:decluttering-template-plus
template: room_tile
default:
  - entity: sun.sun
card:
  type: custom:mushroom-template-card
  entity: "[[entity]]"

Two things that tells the recipient:

Those lines are ordinary YAML comments. They can be pasted back in as they are, and Home Assistant ignores them.

A template’s description: and its variable declarations travel with the export, so a template that describes itself arrives self-documenting — whoever imports it gets the same labels, helper text and entity pickers you do. Worth doing before sharing one.

The exported block keeps its type:, so it is also just a card. Anyone can paste it straight into a view in the raw configuration editor instead of using the Share tab at all.


Importing

Paste what you were given into the Import box and press Import.

If the paste is not a template at all, or is not valid YAML, the editor says that instead of importing anything.


What travels and what does not

Travels Does not
The template’s type, name, default values and content Entities it points at — the recipient’s light.kitchen is not yours
Its style block Custom cards it uses — they install those themselves
A note naming its dependencies Templates it calls — send those separately

See also