Releases: tempus2016/decluttering-card-plus
Release list
v1.2.0
A template that used itself froze the browser tab, and [[entity|friendly_name]] never worked inside a repeat — both are fixed. The rest of the release is about repeats knowing what is inside what they repeat over, so "a tile per room listing that room's lights" stops being a card per room written by hand.
Fixed
- A template whose card used that same template froze the tab. There was no guard of any kind. Every level built the next one while it was still detached from the page, so nothing in the layout ever got the chance to stop it — tested against a real dashboard, the tab stopped responding and had to be killed. Two templates using each other did the same. A card now refuses and names the path round the loop: the template "room_tile" uses itself (room_tile → room_tile), which would never finish. (#62)
[[entity|friendly_name]]never worked inside a repeat. A template that asks Home Assistant for something has to be built again once the registry arrives, because the first build happens beforehassis ever set. That was only ever recorded for templates rendered once, so every copy of afor_eachkept the brackets on screen permanently. Found while screenshotting a card per room for the wiki: the rooms had names, the lights inside them did not. (#77)- A template name that does not exist now offers the closest one that does — nearly always the typo or the rename you are looking for. Capped at two edits on a short name so it never points at something unrelated, and borrowed dashboards are included once they arrive. (#62)
- A template defining two things says which two, instead of restating the rule. A repeat producing more than fifty copies says so once in the console — not an error, but a registry sweep matching half the house reads as a broken dashboard rather than a big one. (#62)
Added
-
with:gives each area copy the entities inside it. Repeating over areas used to hand you the room's name and nothing else, so the shape people actually build still meant writing a card per room. Each copy now getsitems— the whole mappings, ready for a nested repeat — along withentitiesandentity_count. A room with nothing in it is dropped unless you setkeep_empty: true. (#65)type: custom:decluttering-card-plus template: room_summary for_each_from: areas: true with: domain: light columns: 3
# room_summary draws the heading, then repeats a second template over that room's lights card: type: vertical-stack cards: - type: markdown content: '### [[area]] — [[entity_count]] lights' - type: custom:decluttering-card-plus template: light_tile for_each: '[[items]]'
-
exclude:says what a repeat should leave out, and wins over what was taken in — so "every light except those three" is one line rather than a list of everything you did want. Written as patterns it means entity ids; written as a mapping it narrows by anything the source itself can. (#64)for_each_from: domain: light exclude: light.bedside # or: exclude: { area: Bedroom }
-
More ways to narrow, order and cap a repeat. (#64)
Key Does device_classMotion sensors but not door sensors — a domain on its own is too coarse integrationOnly what one integration provides sort/reversename,entity,id,area,domain,floor. Anything else keeps the registry's own orderlimitAt most this many copies. Every copy still carries total, what matched before the limit, so a card can say "showing 5 of 23"rangeRepeat a fixed number of times, with only the position to go on emptyA card to draw when nothing matches — silence otherwise looks the same as breakage -
Placeholders can say what to do when nothing sets them.
[[name?]]takes the option out of the card entirely, which is right when it should not be there and wrong when something should still be shown.default:supplies the text;or:names another variable; both chain with each other and with the transforms. A gap is unset,nullor empty — a0and afalseare values and keep their place. (#63)name: '[[name|or:entity|friendly_name|default:Unnamed]]'
-
Three more things to ask Home Assistant for:
floor, andarea_id/device_id— the ids underneath the names, which is what you want when building one entity id out of another, asbinary_sensor.[[entity|area_id]]_motiondoes. Alsojson, the one step that takes a mapping or a list on purpose rather than refusing it, and dotted access so onefor_eachitem can carry a room's light, sensor and icon together as[[room.light]]. (#63, #65) -
The card editor counts what a repeat matches as you write it, and lists the first dozen. The registry filters were the most powerful thing here and completely invisible until you saved and looked, so a typo in an area name read as "this card is broken" rather than "nothing matched that". The template dropdown now shows each template's description beside its name. (#67)
-
The template editor can duplicate a template, reorder its variables, and start from a built-in library. It also warns when other cards use the template you have open — the Where used tab always knew, but only if you went and looked. The starters are carried in the card rather than fetched, so nothing reaches the internet. (#68)
-
A dashboard still on the original
custom:decluttering-cardnames can be moved over in one press. They work as they are — this card answers to both — but they would stop working the day the original is installed alongside it, because Home Assistant loads resources in the order they were added. (#68) -
debug: truerenders what the card built instead of the card, which is what you want when it only misbehaves on a phone or in a view whose editor is awkward to reach.strict: truemakes it refuse rather than render brackets, for a template you are handing to somebody else. (#66) -
gapsets the space between repeated copies, and a template can declaregrid_optionsonce instead of every card using it repeating the same block. (#66) -
The editors speak French, Spanish and Portuguese, following your Home Assistant language, and the console warnings are translated too. (#80, #81)
Changed
- Every copy of a repeat now also gets
index0,first,lastandtotalalongsideindexandcount. - The wiki is published as a site at https://tempus2016.github.io/decluttering-card-plus/, with the same pages and navigation, and republishes itself whenever a wiki page is edited. (#76, #78, #79)
- The README is now a summary that points at the wiki, with a compatibility table and an honest note on when to reach for auto-entities or button-card instead. (#61, #69)
- Every wiki heading added since v1.1.0 carries
(v1.2.0+), so it is obvious what needs which version. - Repeating a row, badge or picture element is now refused with an explanation rather than a bare message — Home Assistant gives those one slot, so put what you want repeated in a card template.
CONTRIBUTING.md,SECURITY.mdand a code of conduct, plus CodeQL and test coverage enforced in CI. (#69)
Upgrading
No action needed — nothing here changes existing configuration, and every new option defaults to today's behaviour.
If you have ever had a card render [[entity|friendly_name]] as literal brackets inside a for_each, that was the bug above, not your template: it will now resolve on its own.
There is a whole dashboard in examples/demo-dashboard.yaml that exercises most of this — paste it into a new dashboard's raw configuration editor and it renders, no edits needed.
Full changelog: v1.1.0...v1.2.0
v1.1.0
Most of this release comes from reading the
community thread
end to end — 561 posts, 2019 to 2026 — and building the things people kept asking for.
Asking Home Assistant for a value
The oldest request in that thread, asked in one form or another since 2019, is a template
whose name defaults to the entity's own name instead of every card passing one. A
placeholder can now ask:
card:
type: tile
entity: '[[entity]]'
name: '[[entity|friendly_name]]'friendly_name, area, device and attr:<name>, chaining with the transforms and
running in the order written — [[entity|friendly_name|slug]].
The entity's state is deliberately not among them. A card's configuration is built once,
so resolving state would rebuild the whole card every time anything changed. What is here
comes from the registry, which changes about as often as the dashboard does.
A variable the template can do without
[[name?]] is a placeholder the card can manage without: when nothing gives it a value, the
option it stands for comes out of the card rather than being left on screen as brackets. A
tile with no name falls back to the entity's own.
for_each does the same with whole copies, skipping an item that leaves a required
variable empty — so one template serves a room with four lights and a room with one, without
a dummy entity id standing in for the lights that are not there.
Repeating over what Home Assistant knows
for_each_from asks Home Assistant for the list instead of having it written out, so a card
of "every light in the kitchen" grows by itself:
for_each_from:
domain: light
area: KitchenRepeat over entities or areas, narrowed by domain, area, floor or label. Every copy is also
given [[index]] and [[count]], and min_column_width drops a column rather than going
narrower, so one card reads sensibly on a phone and on a monitor.
Seeing what a card actually builds
The template is in one place, the values are in another, and the dashboard renders a third
thing. A card's editor now has a Result panel showing the card it builds with every
variable put in — read-only, one copy where the card repeats over a list. A variable nothing
gave a value to is still written as [[name]] in there, which is the point of looking.
The card also says so in the browser console now, naming the template and the variable,
rather than leaving you to work out where the brackets came from.
Values every template falls back on
decluttering_defaults at the dashboard root sets values every template falls back on, so a
colour shared by a library of them is written once instead of repeated in each. Reached last
of all, so nothing existing changes. In YAML mode a yaml anchor already did this; in storage
mode there are no anchors, which is the whole reason for it.
A borrowed template gets both dashboards' values, the borrowing one first.
When a card comes out spread across the row
A card that sizes itself — a custom:button-card given a width — is narrower than the share
of a row this card is handed, so a stack of them comes out evenly spread instead of packed
together. Measured on three 50px buttons: 58px apart on their own, 132px apart through this
card. fit: contents gives up the wrapper's box and restores the 58px.
It is not the default and cannot be: a card with no box has nothing for style to paint on.
The editor says so if you set both.
Also
- Transforms chain, and
kebabjoins the set:[[room|slug|upper]]. [[!name]]writes the brackets out literally, for a template holding markdown or Jinja.- Renaming a template offers to rename every use of it on the dashboard at the same time.
- A transform handed a mapping or a list now says why it left the placeholder alone
instead of leaving you to guess.
Fixed
- A card hidden by its
visibilityconditions still took up its place in a row. Every
rule in the host styles has the same specificity, so the one hiding the card was being
overridden by the one giving it a display. It looked right in a masonry view, where a
zero-height block leaves no visible gap, and wrong in ahorizontal-stack, where the
hidden card took a full share of the row and squeezed the cards either side of it. v1.0.0
claimed this was fixed; in a horizontal row it was not. - A shared template changed on the lending dashboard is picked up without a browser
refresh.
Requirements
Home Assistant 2024.7 or newer. Badge templates need 2024.8.
Documentation
Everything above is in the
wiki, and every heading new in
this release is marked (v1.1.0+) so you can tell at a glance whether the version you are
running has it.
1.1.0 (2026-08-20)
Features
- chain transforms, escape placeholders, and number repeated copies (#45) (05be5c2)
- let a card get out of the way of the layout (#54) (22bafaf)
- let a dashboard set values every template falls back on (#56) (5b7e60a)
- let a placeholder ask Home Assistant what something is called (#52) (2d4184f)
- let a template do without a variable nobody sets (#55) (9970083)
- rename a template across the dashboard, and find the one a card uses (#46) (807b77b)
- repeat a template over what Home Assistant knows about (#48) (54f9629)
- say so when a card renders a variable nobody set (#51) (0d3fe32)
- show what a card actually builds (#53) (4a7666b)
Bug Fixes
- generate real release notes, and stop the release run failing after publishing (#38) (caf4ac9)
- let a hidden card give up its place in the row (#50) (bd622d6)
- pick up a changed shared template, and fit repeated copies to the card (#47) (ada1a3f)
- say why a transform left a placeholder in the card (#49) (0e0bf79)
Documentation
v1.0.0
1.0.0 (2026-08-18)
The first release of Decluttering Card Plus, a maintained continuation of
custom-cards/decluttering-card, which has
not had a release since April 2023.
It combines three generations of work — RomRider's original card, j9brown's visual
editors, and simbaja's
modernisation — and adds to them.
Installing it over the original card
Your existing configuration keeps working. As well as its own custom:decluttering-card-plus
and custom:decluttering-template-plus types, this card registers the original
custom:decluttering-card and custom:decluttering-template types when the original is not
installed, and the decluttering_templates key is unchanged. Install this, remove the old
card, change nothing else.
Home Assistant loads resources in the order they were added, so if you keep both installed the
original usually wins and your existing cards go on using it. Remove it to get the fixes below.
New
- Badges. A template can hold a
badge:, used from a view'sbadges:list. - Templates shared between dashboards.
decluttering_templates_from:lets one dashboard
borrow another's templates, so a template library can live in one place. - Sharing a template with other people. The template editor has a Share tab that
exports a template as YAML — naming the custom cards and other templates it depends on — and
imports one somebody sent you. visibilityconditions inside templates, including variables inside the conditions
themselves. A hidden card collapses instead of leaving a gap.- Nested variables. A variable's value can contain other variables, resolved in any order.
- Described variables. A template can declare its variables — a label, a description, a
Home Assistant selector, a default — and every card using it then gets a real form field
per variable instead of a box of YAML: an entity picker for an entity, an icon picker for
an icon. - Turn a card into a template. The template editor proposes the conversion for you:
every entity, name, title, heading and icon becomes a variable defaulting to the value it
replaced, so the template renders exactly what the card did. - Repeating with
for_each. One card renders its template once per item in a list —
four rooms that differ only by entity stop being four pasted copies — withcolumnsto
lay the copies out side by side. - Transforms.
[[room|slug]]beside[[room]]lets one variable serve both a name and
the entity id built from it. Four transforms:slug,upper,lower,title. - A Where used tab. Every view that uses the template and how many times, plus any other
template that calls it — worth a look before changing something a dashboard leans on. - Variables in the shape you write them.
variables:anddefault:accept a mapping as
well as a list of pairs, and the editors warn about a variable with no value, or one that
is set but never used, without ever blocking a save.
Fixed
Long-standing issues from the original tracker, all verified against a real dashboard:
- Values containing a newline, a double quote, a backslash or a tab no longer break the card
withJSON.parseerrors — that is every multi-line value and every Jinja template written as
a YAML block scalar (#47,
#60). - An object used inside a longer string is substituted as JSON instead of being left as
[[name]](#83). - Templated cards are sized correctly in the sections layout instead of always taking the
default size (#59,
#80,
#87). fill_containerfills the container (#72),
and an iframe in a panel view fills the panel
(#24).- A card that hides itself no longer leaves an empty space behind it
(#58). - Generated cards no longer share a duplicate
declutter-childid
(#55). - Defaults can reference other variables
(#62,
#84).
Requirements
Home Assistant 2024.7 or newer. Badge templates need 2024.8, which is when badges became
configurable.
Documentation
The wiki has a page per feature,
a quick start, and a
migration guide.
With thanks to RomRider,
j9brown and
simbaja, whose work this is built on. All
MIT licensed.