0.68.0 - Label and badge templates 🏷️✨
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!
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).
- chore: bumps version to 0.68.0 by @gh-action-bump-version
- badges can show labels/jinja - thanks @guillochon! by @warmfire540
- all labels accept jinja - thanks @guillochon! by @warmfire540
- chore: yarn (deps-dev): bump sinon from 21.1.2 to 22.0.0 (#428) by @dependabot[bot]
What's Changed
- chore: yarn (deps-dev): bump sinon from 21.1.2 to 22.0.0 by @dependabot[bot] in #428
- Label and badge templates 🏷️✨ by @warmfire540 in #429
Full Changelog: 0.67.0...0.68.0