Change icon color (open/closed) on lovelace card

I just finished changing some sensors to reflect open/closed instead of on/off which is working but pretty ugly code. Anyway, the state_color: true statement doesn’t seem to be doing anything.

configuration_yaml:
sensor:

  • platform: template
    sensors:
    back_door_status:
    value_template: ‘{% if states.binary_sensor.back_door_sensor_any %}
    {% if states.binary_sensor.back_door_sensor_any.state == “on” %}
    Open
    {% else %}
    Closed
    {% endif %}
    {% else %}
    n/a
    {% endif %}’
    friendly_name: ‘Back Door Status’
    front_door_status:
    value_template: ‘{% if states.binary_sensor.front_door_sensor_any %}
    {% if states.binary_sensor.front_door_sensor_any.state == “on” %}
    Open
    {% else %}
    Closed
    {% endif %}
    {% else %}
    n/a
    {% endif %}’
    friendly_name: ‘Front Door Status’

Lovelace:
cards:
- type: entities
entities:
- entity: sensor.front_door_status
- entity: sensor.back_door_status
state_color: true

sensor

Can anyone help to have the icon change colors or eve introduce a picture of a door being opened and one for closed?

Also, I know the code could be far cleaner. Any ideas to clean it up would be welcome.

Thanks.