Badges
Badges are the small pills across the top of a sections view. A badge template makes them
reusable in exactly the way card does for cards.
Badges need the sections view type, so Home Assistant 2024.8 or newer.
decluttering_templates:
power_badge:
badge:
type: entity
entity: '[[entity]]'
name: '[[name]]'
color: '[[color]]'
show_name: true
default:
- color: blue
Use it in a view’s badges: list:
views:
- type: sections
badges:
- type: custom:decluttering-card-plus
template: power_badge
variables:
- entity: sensor.solar_power
- name: Solar
- color: yellow
- type: custom:decluttering-card-plus
template: power_badge
variables:
- entity: sensor.house_power
- name: House
- color: red
- type: custom:decluttering-card-plus
template: power_badge
variables:
- entity: sensor.living_room_temperature
- name: Living Room
- color: green
sections:
- type: grid
cards: []

Three badges, one template, one variable each for the bit that differs.
Adding one through the UI
While editing a sections view, click + Add badge, then By card, and search for declutter. Pick Decluttering Card Plus — the same card serves badges and cards, and it works out which you meant from the template you choose.
How it sits in the layout
Badges live in a flex row, so the wrapper gets out of the way completely rather than boxing the badge — it does not add a box, spacing, or a layout level of its own. Your badge sits in the row exactly as a normal one would.
One consequence: style reaches the badge itself, but there is no wrapper to paint on, so
selectors aimed at the host have nothing to style. See Styling.
Any badge type
badge: takes any badge configuration Home Assistant supports, including custom badges
from other integrations:
decluttering_templates:
person_badge:
badge:
type: entity
entity: '[[person]]'
show_state: true
show_name: true
tap_action:
action: more-info
badges:
- type: custom:decluttering-card-plus
template: person_badge
variables:
- person: person.john
Reference
| Key | Where | Description |
|---|---|---|
badge: |
template | The badge configuration, with [[variables]] |
default: |
template | Fallback variable values |
template: |
instance | Name of the template |
variables: |
instance | Values to substitute |