I created a simple security setup with door/window sensors and wanted to use an animated icon when a door/window is triggered, but it appears I can only use mdi: xxxxxxx instead.
For example:
sensors:
- platform: yr
- platform: time_date
display_options:
- 'time'
- platform: template
sensors:
template_front_door:
friendly_name: 'Front Door'
value_template: >-
{%- if is_state("sensor.vision_zd2102_eu_doorwindow_sensor_access_control_2", "22") -%}
Open
{%- else -%}
Closed
{%- endif %}
icon_template: >
{% if is_state("sensor.vision_zd2102_eu_doorwindow_sensor_access_control_2", "22") %}
mdi:door-open
{% else %}
mdi:door-closed
{% endif %}
template_patio_door:
friendly_name: 'Patio Door'
value_template: >-
{%- if is_state("sensor.vision_zd2102_eu_doorwindow_sensor_access_control_3", "22") -%}
Open
{%- else -%}
Closed
{%- endif %}
icon_template: >-
{% if is_state("sensor.vision_zd2102_eu_doorwindow_sensor_access_control_3", "22") %}
/local/alert_alarm.gif
{% else %}
/local/alert_ok.gif
{% endif %}