Change cover icon based on state

Hi everyone, i’m new with home assistant and i’m using hass.io with one raspberry pi 3 b+ (i installed it with dale3h’s script).

I tasmotized some sonoff dual and connected them to hass.io as template cover. for exemple:

  • platform: template
    covers:
    archivio_cover:
    friendly_name: “Tapparella”
    position_template: “50”
    open_cover:
    - service: mqtt.publish
    data:
    topic: ‘cmnd/archivio/power1’
    payload: ‘ON’
    close_cover:
    - service: mqtt.publish
    data:
    topic: ‘cmnd/archivio/power2’
    payload: ‘ON’
    stop_cover:
    - service: mqtt.publish
    data:
    topic: ‘cmnd/archivio/power1’
    payload: ‘OFF’
    - service: mqtt.publish
    data:
    topic: ‘cmnd/archivio/power2’
    payload: ‘OFF’
    Cattura

now i would like to change the color of the cover icon based on the state (while open/close= yellow color, while stop=blue). How could i do that? Thanks to everyone :slight_smile:
ps. i setted the position_template to 50 because i always want to be able to press up and down keys and i don’t need to set the position.

look here