Skip to content
tempus2016 edited this page Jun 24, 2026 · 1 revision

Badges

A badge is a small piece of text shown on a tab — perfect for unread counts, alarm states, or "X on" summaries.

Entity badge

Set badge to an entity id and the badge shows that entity's state:

tabs:
  - name: Inbox
    icon: mdi:email
    badge: sensor.unread_count
    card: { ... }

Template badge

Set badge to a Jinja template (anything containing {{ or {%) and it is rendered live over the HA websocket:

tabs:
  - name: Lights
    icon: mdi:lightbulb-group
    badge: >-
      {{ states.light | selectattr('state','eq','on') | list | count }}
    card: { ... }

Behaviour notes

  • A plain string that is neither an entity id nor a template is shown verbatim.
  • An empty or unresolved template renders no badge (rather than unknown).
  • Template badges update automatically when their inputs change.

Clone this wiki locally