you need to be precise. The template you use is a Jinja template, and is only supported in native components explicitly supporting that. Or in template sensors and automations. see the links on https://hvb.duckdns.org:8125/developer-tools/template
if so it uses the syntax:
icon_template: >
{{etc}}
Custom-ui uses javascript templates (JS). This uses the syntax:
entity_id:
templates:
icon: >
if (this) return 'that';
SO, not only are you using the wrong template (jinja instead of js) you are also mixing the syntaxes …
In order to use the JS icon template I provided above, you need to install custom-ui first and then save the template in a customize section in your config.
though the templates are fine (you can leave out both 'else’s) they shouldn’t be in customize.glob which is for global customizations. These templates are for an individual entity and should ideally be under
yes, thats fine, simply only add the entity and the template
not sure what you mean here, but no support for templating in standard Lovelace cards. You can use templating in the ‘backend’. Server-side. Where you create your sensors, automations, and define the config of integration etc etc.
because you can only do what is designed to be done. If it is not supported natively, than you can use custom-ui. And need to conform to the syntax and techniques it uses.
everything is explained in the docs I linked you to. It is of utmost relevance you should read that, and try to grasp what is explained there.
I used customize_glob.yaml because icon_color is not working in customize.yaml…
So I tested again the customization of the icon (and only the icon) in customize.yaml for a cover… After HA restarted, I have no icon in this following case…
also, you shouldn’t be needed to restart, simply click Configuration/Server controls, and then Reload location and customizations. Most of the time this takes care of things
Marius, how do you get the icons to be a different color than the default theme color? I have an entity card for lights (green theme) it shows the light is gray for off but on it shows as theme color green. I would love to do what you did with the different colors for the side bar as well as cards.