Customize cover icon color according with state?

Hi Folks,

wonder if it’s possibe or open to suggestion to change cover icon color according with sensor state.

cover.yaml

#### Pool Gate Cover  #####
  - platform: template
    covers:
      pool_gate:
        device_class: gate
        friendly_name: "Pool Gate"
        value_template: >-
          {% if is_state('binary_sensor.shelly1_8caab55fe84b_external_input','on') %}
            Open
          {% else %}
            Closed
          {% endif %}
        open_cover:
          service: switch.turn_on
          data:
            entity_id: switch.shelly1_8caab55fe84b
        close_cover:
          service: switch.turn_off
          data:
            entity_id: switch.shelly1_8caab55fe84b
        stop_cover:
          service: switch.turn_on
          data:
            entity_id: switch.shelly1_8caab55fe84b
        icon_template: >-
          {% if is_state('binary_sensor.shelly1_8caab55fe84b_external_input','on') %}
            mdi:gate-open
          {% else %}
            mdi:gate
          {% endif %}

customize.yaml

cover.pool_gate:
  device_class: gate
cover.ramp_gate:
  device_class: gate

HA view
image

first 2 bottons code

type: vertical-stack
cards:
  - type: horizontal-stack
    cards:
      - type: button
        tap_action:
          action: toggle
        entity: cover.pool_gate
        name: Piscina
        icon_height: 40px
        show_state: false
      - type: button
        tap_action:
          action: toggle
        entity: cover.ramp_gate
        icon_height: 40px
        name: Rampa
      - type: button
        tap_action:
          action: toggle
        entity: cover.garagem_basculante
        name: Garagem

Icons already change depending on state, final missing adjustment is only color.

Any great ideas?