@Ulrar wrote:
Hi,
I have templating in various cards that I setup a while ago without any issues, but now trying to make a new card I’m struggling to get it to work for some reason.
When I use icon: ‘mdi:fan’ for the fan it works fine, but as soon as I use icon_template: it switches back to the default icon and ignores the template entirely :
Here is the code itself :
entities: - entity: light.bathroom_light_light name: Main Light toggle: true type: 'custom:slider-entity-row' - entity: switch.bathroom_fan_switch name: Fan icon_template: | {% if is_state('switch.bathroom_fan_switch', 'on') %} mdi:fan {% else %} mdi:fan-off {% endif %} - entity: sensor.bathroom_sensor_humidity name: Humidity title: Bathroom type: entities show_header_toggle: false
What am I missing ?
Thanks
Posts: 1
Participants: 1