Trying to dynamically change icons using custom icons, is it possible?
I’ve added a www folder in my /.homeassistant folder with several icon files.
Copied the code from documentation changing only the location of my icons
It’s displaying blank for the icon.
Thanks
- platform: template
sensors:
day_night:
friendly_name: 'Day/Night'
value_template: '{% if is_state("sun.sun", "above_horizon") %}Day{% else %}Night{% endif %}'
icon_template: >
{% if is_state("sun.sun", "above_horizon") %}/local/phase.png{% else %}mdi:amazon{% endif % }