Hi I am trying to set the color of an icon for a template sensor, from what I’ve read I seem to be doing it correctly but there seem to be so much conflicting information
Below is the sensor deceleration and the sensor customize
Just want to clarify, The portions that were wrong was 3 equal signs, the direction of the arrow, the way you called out the rgb_color, and the template section you placed it in. The brackets you used are valid, but they are only necessary when you have a multiple lines inside your if/else if/else statements.
Hi,
I am trying to duplicate this for Lovelace Glance type card, I wanted my battery sensors and temperature sensors to show different colours depending on state.
I manually installed the CustomUI as per the above instructions, I then added this to one of my entries in customize.yaml (obviously i will do more but just wanted to get it working with one first)
yes did both of those and tried from a private browser as well incase a cache issue.
I don’t think i have installed it all correctly actually, as i do not see Customizer component in my configuration panel.
I thought i had but now rechecking it all.
I have /www/custom_ui/state-card-custom-ui.html and /www/custom_ui/state-card-custom-ui.html.gz
Also created /custom_components/customizer/ (with 2 files init.py and services.yaml)
HI,
though I am by no means experienced in Lovelace yet, and don’t know if it could have to do anything with Lovelaces specifics, I read you have the custom state card added in configuration.yaml. It is however a setting to be set in frontend.
I do that by having the frontend: !include frontend.yaml entry in configuration.yaml, and have the file frontend.yaml in the /config directory, and with this content:
yes, although not seperate like your setup i tried extra_html_url: under frontend.
my javascript_version is set to latest and i have themes as well. I then have customizer outside of this; (i understood i use either extra_html_url or customizer which is why commented out below)
# Enables the frontend
frontend:
javascript_version: latest
themes: !include_dir_merge_named themes/
extra_html_url:
- /local/custom_ui/state-card-mini-media-player.html
# - /local/custom_ui/state-card-custom-ui.html
customizer:
custom_ui: local
thank you, yes i did mean it was all in the configuration.yaml rather than seperate files.
I found my error, i did wget on the .gz file which was linked, instead of downloading and including a true .gz type zip it actually saved a webpage.
Now updated and seemingly working.
Many thanks for the assistance!