Renaming sensor output

I can’t for the life of me figure out how to rename the output value from my alarm’s ‘full set’. I have this but it’s not working, can someone please help?

type: vertical-stack
cards:
  - type: glance
    entities:
      - entity: sensor.risco_alarm_status_events_name
        name: Main Alarm
        icon: mdi:shield
        template:
          - sensor:
              - name: State
                state: >
                  {% if is_state('sensor.risco_alarm_status_events_name', 'full
                  set') %}
                    Alarm ON
                  {% else %} 
                    Alarm OFF
                  {% endif %}
    state_color: true

Glance card do not support templating. None of the built in cards support templating AFAIK.

Use a custom card instead, many of those support what you want. :smiley:

Good lord! I was breaking my head for hours trying to get this to work :smile:

1 Like

You need to make a sensor that reads the state of the current sensor.
Like you already did but in configuration.yaml instead.

Great thanks. I will try that.