#code in "name:"

1 messages · Page 1 of 1 (latest)

pseudo current
#

hi there gurus,
I'm trying to customize the name of an entity for a badge. I don't event know if is possible. can you please advice ?
This is what I got so far

type: heading
heading: Bedroom
heading_style: subtitle
icon: mdi:bed
badges:
  - type: entity
    show_state: true
    show_icon: true
    entity: climate.bed_radiator
    icon: mdi:radiator
    state_content: name
    name: |
      {{% if states('climate.bed_radiator') == 'heat' %}}
        "On"
      {% else %}
        "Off"
      {% endif %}

the above will not work. it just shows the code as a name.

dire glade
#

templates are not supported there