Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 106484

Customise light icon

$
0
0

Hi,

I have Shelly 1 that controls a light. I have used the Shelly integration to configure it. I want to configure different icons for off and on state. Can I add it in configuration.yaml?

I tried the below snippet and neither icon_template nor color_template are having any effect. The friendly_name and icon works though.

homeassistant:
  
  customize:
    light.study:
      friendly_name: test_light
#      icon: mdi:rss-box
      templates:
        icon_color: >
          if (state.attributes.brightness < 150) return 'blue';
          return 'red';
      
        icon_template: >
          {% if states('light.study') == 'on' %}
            'mdi:rss';
          {% else %}
            'mdi:rss-off';

Regards,
AK

3 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 106484

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>