Value template not working in UI ( works in Dev Tools)

I have this value_template for a template sensor:

- platform: template
  sensors:
    patiosensors:
      value_template: >-
        {%if states('group.patio_sensors') == 'on' %}Open{%elif states('group.patio_sensors') == 'off' %}Closed{% endif %}

It is used in the UI in an entity card as this:

 - entity: group.patio_sensors
    value_template: '"{{states(''sensor.patiosensors'')}}"'
    group: true
    state_color: true
    show_state: true
    theme: transparentblue
    icon: mdi:door
    name: Sliding Doors

In Developer tools, I get the expected result, Open/Closed, but the UI only ever displays On/Off.

So what am I missing?
Thanks

Value_template isn’t a valid field on Lovelace cards. Use the other entity

Removed post

Ah, I see. Using sensor.patiosensors instead actually works.
Thanks much!