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. Below that, templates other people have posted can be browsed and installed without copying anything (v1.15.0+).

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.
As a file (v2.1.0+)

Download saves the same text as a .yaml file named after the template, room_tile.yaml,
for sending as an attachment or keeping a copy of beside your backups.
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:
type: custom:decluttering-template-plus
template: room_tile
requires:
custom_cards:
- mushroom-template-card
default:
- entity: sun.sun
card:
type: custom:mushroom-template-card
entity: "[[entity]]"
includes:
my_button_base:
type: custom:decluttering-template-plus
template: my_button_base
card:
type: button

What that tells the recipient:
- Custom cards they need installed. This one will not render without Mushroom. Since
v2.8.0 they go under
requires:, its own and the included templates’, after any you listed yourself, so the install check still sees them after the dashboard has saved. Before that they were a comment above the YAML. - The other templates it calls come with it (v1.6.0+), under
includes:, and so do the templates those call, and the ones it is built on withextends:. A bundle arrives working rather than with a note about what else to find. Before v1.6.0 an export carried exactly one template and named the rest in a comment; anything that still cannot be found is named that way now.
Anything else the export has to tell you, such as a template it could not find, is still an
ordinary YAML comment above it, so it can be pasted back in as it is. They are
for the person reading the text, though, not for Home Assistant to keep: a dashboard edited in
the UI drops every comment when it saves, so once the template is in, the notes are gone. Put
anything the recipient must still know later in the template itself, in description:,
requires: or readme:.
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.
(v2.10.0+) A template going to people who read another language can carry its words in
theirs. Put the titles, labels and descriptions in a language: block, one mapping per
language code, and write [[$key]] where each goes. The block travels in the export and is
kept on install, and every viewer sees the template in the language of their own Home
Assistant profile, falling back to the same language without its region, then English, then
the first language written. Include en for that reason. See Translating a Shared Template.
The exported block keeps its
type:, so it is also just a card. A template that carries nothing underincludes:can be pasted straight into a view in the raw configuration editor instead of using the Share tab at all. One that does should go in through the Share tab’s import: only the import unpacksincludes:into templates of their own. Pasted as a card, the templates under it are never defined, and whatever calls them says the template was not found.
The dashboard values it uses (v2.8.0+)
A template can read values it does not set itself: from decluttering_defaults on its
dashboard, or on the library dashboard. Whoever imports
it has none of those, so the export brings the ones it uses into its default:, after its own,
which still win. A value built from another (host: http://frigate:[[frigate_port]]) brings
that one too. The included templates get theirs the same way. Values it does not use stay at
home, and the export names the ones it brought in, so check none of them is private before you
send it.
Keeping a password or token out
List the variable in setup:. A name in setup: is never brought in from the dashboard: it
is asked for when the template is installed, which is where the other person’s own password
belongs. Keep your value in decluttering_defaults on your dashboard or the library, and leave
it out of the template’s own default::
# The library dashboard (or this one)
decluttering_defaults:
- frigate_password: my-real-password
- frigate_port: 5000
decluttering_templates:
frigate_camera:
setup: [frigate_password, camera]
default:
- icon: mdi:cctv
card:
type: iframe
title: "[[camera]]"
url: "http://frigate:[[frigate_port]]/cameras/[[camera]]?token=[[frigate_password]]"
The template works on your dashboard, the export carries frigate_port: 5000 but not the
password, and the person installing it is asked for frigate_password and camera. The
export says which values it left out because they are in setup:.
Before v2.8.0, a template carried under includes: took every value in the dashboard’s
decluttering_defaults with it, used or not. If you shared one that called other templates,
check what went out.
Saying who wrote it and what it needs (v2.6.0+)
A template can carry the details someone installing it wants to know: who wrote it, the licence, where to read more, what it needs from their Home Assistant, and what to ask them as it goes in. They are ordinary keys on the template, so they travel in an export and a post like description: does, and none of them change what it builds.
decluttering_templates:
door_camera:
description: A doorbell camera with its motion sensor
author:
name: John
github: tempus2016
license: MIT
help: https://community.home-assistant.io/t/...
homepage: https://github.com/you/your-templates
readme: |
Shows the **front door** camera, with the motion sensor underneath.
related: [room_tile]
requires:
integrations:
- integration: [frigate, reolink]
message: Needs Frigate or Reolink.
entities: ['binary_sensor.*_motion']
custom_cards: [advanced-camera-card]
homeassistant: '2026.10'
card: '2.6'
setup: [motion]
default:
- motion: binary_sensor.hallway_motion
card:
type: custom:advanced-camera-card
cameras:
- camera_entity: '[[camera]]'
| Key | What it is |
|---|---|
author |
A name, or a mapping of name, github, email and url |
license |
The licence it is shared under, such as MIT |
help |
A link to a page or post that explains it |
homepage |
Where it lives, and where newer versions turn up |
readme |
Markdown, shown before it is installed |
related |
Templates that belong with it though it does not call them. They go out with it under includes:, the way the templates it calls do |
requires |
What it needs: integrations, entities (with * for anything), custom_cards, and the oldest homeassistant and card versions it works on. An entry can be a list of names, any one of which will do, with a message |
setup |
Variables to ask for when it is installed. The answers are written into its default: list |
Before installing, from the shared list, a paste or an update, the Share tab shows the details at the top of the entry: who wrote it, the licence, the links and the readme. Under them it lists any requirement this Home Assistant does not meet. That never blocks the install, since installing may be the first step of setting it up, but it says the template may not work until they are there. Then a Set up form asks for each setup variable, filled in with the template’s own default; leave one as it is to keep that default. An update keeps the answers already written.
Write versions in quotes. YAML reads an unquoted 2026.10 as the number 2026.1, so the Share tab warns about an unquoted version on export and on paste.
Links are shown only when they are http or https, and the text is trimmed to a sensible length, because a template from a post is someone else’s config. The checks a shared template gets before it goes in, such as the addresses it reaches, look past these keys: a homepage is a link for you to follow, not something the card fetches.
author, license, help, homepage, readme and related describe one template, so a template made with extends: does not inherit them. requires and setup are inherited, since a child needs what its parent does.
Filling them in: Sharing details (v2.6.0+)

At the top of the Share tab, the folded Sharing details panel edits all of these without YAML. The lists take one entry per chip. A requirement written with a message or as a list of alternatives has no field here; it stays as written and is kept when you save.
Importing
Paste what you were given into the Import box and press Import.

Or (v2.1.0+) press Open a file and pick a .yaml (or .json) file someone sent you.
It is read into the Import box, so you can see what it is before you press Import, and
it goes through the same checks as a paste.
- It replaces the template card you are editing, so start from a new Decluttering Template Plus card unless you mean to overwrite an existing one.
- Nothing is written to your dashboard until you save the card, in the usual way. Cancel and nothing happened.
- If the incoming template has the same name as one you already have, the editor says so and waits for you to press Import a second time. Two templates sharing a name means only one of them is ever used, so this is deliberately a two-step.
- Or press Import as a copy (v1.6.0+), which takes the next free name —
room_tile_2— and leaves the one you already had untouched. Useful when you want to compare the two rather than choose blind.
If the paste is not a template at all, or is not valid YAML, the editor says that instead of importing anything.
A paste is checked like a shared post (v2.0.0+)

A pasted template that opens the garage when pressed: the first press says so, the second imports it.
A template pasted into the Import box gets the same scan as one picked from the shared list: the services it calls when pressed, addresses outside Home Assistant, embedded web pages, JavaScript or Jinja. When it finds anything, the first press of Import lists it, beside any name clash, and Import anyway goes ahead. A paste with nothing to warn about is still one press.
A source: line in a paste, saying which shared post it came from, is taken off before
anything is kept, so a pasted template cannot claim a post it was never installed from.
Templates other people have shared (v1.15.0+)
The project’s GitHub has a discussion category, Share your templates, for posting templates. The bottom of the Share tab reads it.

- Nothing is fetched until you press Load shared templates. Opening the editor, or the Share tab, never reaches the internet. The list is kept for six hours after that; Check for new ones asks again.
- Pick one and it says what it needs before anything happens: the templates it carries
with it under
includes:, which are installed alongside it, any custom cards you need to install yourself (from v2.0.0 only the ones you do not have, see below), and any template it calls that it does not bring and you do not have. - It says what the template would do once installed (v1.15.1+): the services it
calls when something on it is pressed, any address outside Home Assistant it reaches,
whether it embeds a web page, and whether it carries JavaScript or Jinja, which run with
your login. A template that does none of those shows no warning. The list is read off the
YAML, so it is a prompt to look, not a verdict - a lock template calls
lock.unlockbecause that is its job. - What it defines opens the whole template, open from the start (v1.15.1+). Nobody reviews what is posted, so read it before installing — Read the post goes to the discussion, where the author explains it and anyone who tried it may have said how it went.
- A template it brings cannot take over one you borrow (v1.15.1+):
includes:that clash with a name from a dashboard you borrow from are left out, as ones you already have here always were. - Install into and the second press work as they do for the
built-in examples: a template card on this
view, or the dashboard’s
decluttering_templates:. - A name you already have is never overwritten. The button says Install as room_card_2 instead, and the shared template goes in under that name. Templates it carries that you already have are left exactly as they are.
A post only appears if its first YAML block is a template the Import box would accept. If it is not in the list, that is usually why. A post over 64 KB, or one whose YAML uses anchors and aliases to balloon when read, is left out too (v1.15.1+).
GitHub allows 60 requests an hour from one address without signing in, shared with anything else on your network that asks. If you hit that, the editor says when to try again and keeps showing the list it last fetched.
Custom cards you do not have (v2.0.0+)

This shared graph needs mini-graph-card, which this browser does not have.
Before installing from the shared list or the built-in examples, the custom cards a template is built from that this browser has no card for are named in a warning. It never blocks the install, since installing may be the first step of setting that card up, but cards using the template show an error until the custom card is installed.
Checking for updates (v2.0.0+)

The post was edited after front_door was installed, and the new version unlocks the door on a tap.
A template installed from a post remembers where it came from, under source:: the
discussion, when the post was last edited, the template’s name in the post and who posted
it. Substitution never reads it. The Share tab lists the templates on this dashboard
installed that way, under Installed from shared templates.
Check for updates asks GitHub, only when pressed, and marks each one Up to date, Update available or No longer in the shared list. It compares when the post was last edited, not the content, so a template you changed after installing is not mistaken for a new version. A post now under a different account is reported as such and offers no update.
An available update shows what would change as a diff, and the same warnings an install gets, narrowed to what is new against your copy when anything is. Update, pressed twice, replaces the template wherever it is defined. The cards using it are not touched, and any change you made to the template itself is lost. It can be undone like any other rewrite.
Against the version you started from (v2.9.0+)
Compare with, on the Share tab, sets a template beside the starter library’s version, the newer version of the post it came from, or a copy the trash kept, as a line diff, and can take the other version back. See Visual Editors.
Browsing as a gallery (v2.9.0+)

The lists on the Share tab tell you a template’s name and what it is for. Browse templates, under Start from one of these, shows you what it looks like. It opens a gallery with three tabs, each with a count:
- Starter library: the built-in examples.
- Shared by others: the shared templates, once you have pressed Load shared templates on the Share tab. The gallery never fetches them itself.
- Installed: the ones on this dashboard that came from a shared post.
Each tile is the template drawn as a real card against a sample house, with a lit kitchen ceiling and the like, so it shows something without your own entities. A row or a badge has no card to draw, so its tile says what it is. Under the picture are the name, the description and how many variables it has. A search box looks through names, descriptions and the custom cards a template uses, and chips narrow the tiles to cards, rows, badges, picture elements, groups or repeats.
Click a tile’s text to pick it. The foot then says where it would go and what it would bring: the templates it needs installed with it, custom cards you do not have, and for a shared one what it would be allowed to do, the same warnings as the list. Preview in full shows the YAML. Install is the same install as the lists, asking twice where they do; a template you already have says so.
Bringing templates over from button-card and auto-entities (v2.9.0+)

Convert from another card, on the Share tab under Import, takes a paste from one of two other cards and shows what it would be as decluttering templates, underneath. Nothing changes until you press Install.
From button-card templates
Paste your button_card_templates: block, a few of its entries, or one entry on its own:
button_card_templates:
base_light:
variables:
room: Room
show_state: true
tap_action:
action: toggle
room_light:
template: base_light
entity: '[[[ return variables.light ]]]'
name: '[[[ return variables.room ]]]'
Each entry becomes a template that builds a custom:button-card:
- its
variables:become declarations, with their values as defaults; - a JavaScript block that only hands a variable back,
[[[ return variables.light ]]], becomes the placeholder[[light]], and the variable is declared; - its
template:becomesextends:, so a family of button-card templates comes over as a family. A parent that was not pasted cannot be followed, and a note says so; - any other JavaScript is left as it is, for button-card to run, and a note lists where. The variables it reads are passed on to button-card, so it still finds them.
The first entry is the template that is installed; the rest go with it under includes:.
From auto-entities
Paste a custom:auto-entities card:
type: custom:auto-entities
card:
type: entities
title: Kitchen lights
filter:
include:
- domain: light
area: kitchen
options:
secondary_info: last-changed
exclude:
- entity_id: light.kitchen_hood
sort:
method: name
It becomes a template named converted_rows that repeats over the
registry, and the card to use it:
decluttering_templates:
converted_rows:
variables:
- name: source
default:
domain: light
area: kitchen
entities: true
exclude:
- light.kitchen_hood
sort: name
let:
row:
entity: '[[entity]]'
secondary_info: last-changed
card:
type: entities
title: Kitchen lights
entities:
- '[[row|repeat:source]]'
type: custom:decluttering-card-plus
template: converted_rows
The filter’s domain, area, floor, label, integration, device class and entity category, an
entity_id pattern, exclude entity ids, and sorting by name or entity id with reverse and
count all have an equivalent. The rule’s options go on every row, with this.entity_id
written as [[entity]]. An inner card other than an entities card, a glance or a stack say,
has the list it fills repeated the same way, card_param included.
What has no equivalent is left out and named, rather than guessed at:
- Filters on live state,
state,attributes,last_changedand the like. A decluttering card builds once and follows the registry, not the states, so “the lights that are on” is not something it can do. - More than one include rule. A repeat has one source, so only the first is converted; make one card per rule.
show_empty: false. Give the card anempty:card instead.- Sorting by anything but the name or the entity id.
Installing
Install writes every template the conversion made into the dashboard’s
decluttering_templates in one save, which can be undone from the toast. When one of the names
is taken it says which and waits for a second press to replace it. The card for an auto-entities
conversion is yours to add: Copy copies the templates and the card together. The custom
cards the result needs, custom:button-card say, are named under it.
Writing a template for other people
A template you use yourself only has to make sense to you. One you share gets filled in by people who never saw how it was built, so they cannot know which field drives which. These habits keep it working for them.
Work values out instead of asking for them
Anything that follows from another field belongs in a default: that uses that field. A
default that uses another variable is worked out again whenever that variable changes, live
in the editor, so picking a different camera moves everything built from it along too. A field
somebody sets by hand stays as they set it, because the card treats a typed value as their
choice. The fewer fields a user has to fill in, the fewer can be left behind when something
changes.
Keep each choice in a field of its own
A list or mapping in one field is stored whole. Change one item in a list the template worked out, say switch off one detection, and the card keeps the whole list as it stands. From then on, changing the zone or the camera no longer reaches any item in it, and nothing on screen says so.
So do not hand users a worked-out list to edit. Work the list out, and give the choices people make about it fields of their own:
decluttering_templates:
detection:
default:
- skipped: '[[skip|contains:[[type]]]]'
item:
entity: binary_sensor.[[zone]]_[[type]]_occupancy
name: '[[type|capitalize]]'
camera_detections:
default:
- detectors: [{type: person}, {type: car}, {type: cat}]
variables:
- name: camera
label: Camera
selector: {entity: {domain: camera}}
- name: zone
label: Zone
description: Worked out from the camera. Change it only if your zone is named differently.
default: '[[camera|object_id]]'
- name: skip
label: Detections to leave out
selector: {select: {options: [person, car, cat], multiple: true}}
card:
type: entities
entities:
- '[[detection|repeat:detectors|unless:skipped]]'
Leaving out the cat now sets skip: [cat] and nothing else. The rows are still worked out
from the zone, so changing the camera or the zone moves every row, and the cat stays left
out. Filtering copies with unless: needs v2.10.0 or later; see
Keeping only some copies.
Put fields that depend on each other together
Give a field and the fields worked out from it the same group:,
with the one that drives the rest first. A user who changes the camera then sees the zone just
below it, not folded away in another section. Say what a field is worked out from in its
description:, as the zone above does. If a field only matters for some values of another,
show_if
keeps it out of the way the rest of the time.
Check what the template builds
Entity ids a template puts together, like binary_sensor.[[zone]]_person_occupancy, are
the first thing to break when a user’s names differ from yours. A
check with exists tells them which one is missing,
where otherwise each row would only say Entity not found. Added to camera_detections
above:
default:
- detectors: [{type: person}, {type: car}, {type: cat}]
- person_sensor: binary_sensor.[[zone]]_person_occupancy
checks:
- name: No zone sensor
condition: '[[person_sensor|exists]]'
fail_on: false
message: There is no [[person_sensor]]. Check the Zone field.
Point people at Reset
A field somebody has set shows a
Reset button when the template has a default for
it. When a field is worked out from another, say so in the template’s description: or its
readme:: a user who changed it by hand and then changes the camera should press Reset
to have it worked out again. From v3.0.0 the card editor
says so itself when an edit leaves a field like
that behind.
Posting yours for everyone (v1.15.0+)
- In the Share tab, press Copy as a post. It copies the template’s description, the notes about what it needs, and the export in a YAML block — exactly what the list reads back.
- Press Open GitHub, which starts a new discussion in Share your templates.
- Give it a title that says what it does, paste, and add anything worth knowing.
The title is what people see in the list, so “Room card with lights and climate” works better than the template’s name. Editing the post later updates what everyone gets the next time their list refreshes.
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 |
Every other key it carries: style, variables, let, description, extends and the rest. defaults: goes out folded into default:, which every version of the card reads |
Custom cards it uses — they install those themselves |
The templates it calls or extends, under includes: (v1.6.0+) |
Anything it calls that could not be found — named in a comment instead |
| A note naming custom cards it needs | Which shared post it was installed from, its source: (v2.0.0+) |
Its sharing details, author to setup (v2.6.0+), and the templates in related under includes: |
Dashboard values it does not use, and any named in setup: (v2.8.0+). View and section values do not go either |
The dashboard values it uses, in its default: (v2.8.0+) |
|
Item templates it fills in with with: or repeat:, under includes: (v2.8.0+) |
|
Templates a variable picks (template: '[[kind]]_tile') whose names fit, under includes: (v2.8.0+) |
Ones whose names do not fit — the export says it is picked, so send those yourself |
See also
- Sharing Between Dashboards — the same templates across your own dashboards
- Visual Editors — the rest of the editor
- Defining Templates — what a template is made of