Skip to content

0.68.0 - Label and badge templates 🏷️✨

Choose a tag to compare

@github-actions github-actions released this 16 May 20:04

Documentation: Label templates (Jinja)

Entity, sensor, and badge labels can now use Jinja2 templates, not only fixed text. The same applies to label on state and threshold rows when you want the caption to change with conditions and pull live data from other entities!

image image

What you can do

  • Show another entity’s state under an icon (e.g. temperature under a light).
  • Put short live values directly on badges (e.g. temperature or humidity on the icon corner).
  • Keep simple text labels unchanged (Kitchen, Door).
  • Use templates on threshold/state rows for advanced captions (e.g. Hot {{ states('sensor.temp') }}°).

Enable icon labels with the show_entity_labels feature. Sensor labels follow the existing sensor label rules (see sensor configuration).

Quick example

type: custom:room-summary-card
area: living_room
features:
  - show_entity_labels
entities:
  - entity_id: light.living_room
    label: "{{ states('sensor.living_room_temperature') | round(1) }}°"
    badges:
      - entity_id: sensor.living_room_temperature
        position: top_right
        mode: show_always
        label: "{{ states('sensor.living_room_temperature') | round(0) }}°"
sensors:
  - entity_id: sensor.living_room_humidity
    label: "{{ states('sensor.living_room_temperature') | round(1) }}° / {{ states('sensor.living_room_humidity') | int }}%"

Templates are evaluated by Home Assistant; see the templating docs for syntax.

More examples (state/threshold labels, fallbacks, editor tips): Label templates (Jinja).


What's Changed

Full Changelog: 0.67.0...0.68.0