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

Overwrite icon_color with customize_glob.yaml

$
0
0

Hi everyone,

I’m looking for a quick help to understand how I can overwrite the color on my icon with the customize_glob.yaml.

It’s working for the occupancy sensors (Apple TV and laptop) but not for the lights: Desk [wled integration] and Rainbow [nanoleaf integration].

sensor.*_occupancy:
  templates:
    icon_color: >
      if (state === 'Ethernet') return 'rgb(34, 160, 137)';
      if (state === 'Wifi') return 'rgb(34, 160, 137)';
      if (state === 'Playing') return 'rgb(34, 160, 137)';
      if (state === 'Home') return 'rgb(34, 160, 137)';
      return 'rgb(81, 81, 81)';

light.*:
  templates:
    icon_color: >
      if (state === 'on') return 'rgb(34, 160, 137)'; 
      return 'rgb(81, 81, 81)';

Did I’m missing something?

Thanks

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 106223

Trending Articles



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