I found this: https://community.home-assistant.io/t/animated-svg-icons/52615/3
And I use: https://shapeshifter.design/ to make animation svg files.
Then I put all svg files to folder /local/icons/kodi-playing/.
my template:
entity_picture_template: >-
{% if is_state('media_player.bedroom_rpi3_kodi', 'playing') %}
{% set path = "/local/icons/kodi-playing/" %}
{% set ext = ".svg"%}
{{[path,ext]|join("")}}
{% elif is_state('binary_sensor.ping_bedroom_rpi3', 'off') and is_state('media_player.bedroom_rpi3_kodi', 'off') %}
/local/icons/kodi-playing.svg
{% else %}
/local/icons/kodi-playing.svg
{% endif %}
Not working there are no icon at all?