Try a template
Give it your templates and a card that uses one, and it shows what the card hands Home Assistant: the final YAML, every card of ours inside it built too, with what it warned about and the same debug report debug: report gives. It runs the card's own build, so what you see is what a card on a dashboard gets from the same templates and the same states. Nothing you type leaves your browser.
For a single placeholder and what each step of it gives, use Try a placeholder. To make a template from cards you already have, use the template builder.
As under decluttering_templates: on a dashboard - with that key, without it, or a whole dashboard's YAML pasted in. decluttering_defaults: and decluttering_let: beside it work as on a dashboard; card, item and function templates all go here.
The card as it sits on the dashboard: type: custom:decluttering-card-plus, its template: and variables:, and anything else a card takes - for_each:, template_by_domain:, strict:, card:.
Your own entities
Added to the sample house, written as on Try a placeholder: domain: is all an entry needs, and count: 20 makes twenty, numbered wherever [[index]] is written.
Things to try
The card editor, roughly
A stand-in for the card editor's form, made from the template's declared variables. The controls are plain - a text box stands in for an entity, icon or colour picker - but each field's default, whether show_if/hide_if hide it and its group are worked out as the editor works them out. Changing a field writes it into the card box and builds again; emptying it takes it out, so its default applies.
What it builds
What it said
What it does not do
- The card's build runs here, not the cards it builds: nothing is drawn, and a card of Home Assistant's or someone else's is only its YAML.
for_each_from:andoptions_from:, and arepeat:over a registry source, read the sample house below - not your Home Assistant - and afor_each_from: {template: ...}that renders Jinja does not build here at all.- A state is read only for entities the card lists in
rebuild_on, as on a dashboard, unless you tick "Every state readable". The sample house's entities have no history,translategives back what it was given, and[[...|installed]]steps know of nothing installed. - The page is as wide as a desktop:
variables_mobile:is not laid over. Section and viewdecluttering_defaultsdo not apply; the dashboard's do. - The form is a stand-in: selector options a real picker would offer, a card picker, and validation are left out.
- A template too large for the page to build at typing speed switches to a Build now button.
Sharing an example
The address follows the boxes, so Copy link - or the address bar - gives a link that opens this page with the same templates, card and entities. It is all after the #, which your browser never sends anywhere. A big template makes a long link; past a few thousand characters a gist travels better.
A public gist can be opened by id, or with a link ending try-template.html#gist=<id>. The page asks GitHub for it with no login - GitHub allows sixty of those an hour per address - and fills the boxes from:
- files named
templates.yaml,card.yamlandentities.yaml(or.yml), one box each, any of them; or - a single YAML file with
decluttering_templates:(and anydecluttering_defaults:beside it),card:andentities:keys.
The page only reads gists. To share one, make it on gist.github.com and send its link.
The sample house
The same made-up house as Try a placeholder, with your own entities added.