EDIT: Removed everything from /config/www/custom_ui/
and only left state-card-custom-ui.html
. It’s working again
EDIT2: Went back to my original configuration.yaml
file where I only have
homeassistant:
customize: !include customize.yaml
where the file customize.yaml
was NOT modified (doesn’t even have that customize_glob
or custom_ui_state_card: state-card-custom-ui
in it) and it still works so I’m a happy camper.
You can ignore what’s below this line
I can’t get it to work
I’ve changed the original /config/www/custom_ui/state-card-custom-ui.html
file to the file Mariusthvdb has in his github (had to copy the whole file and paste it in the supervisor file editor because I couldn’t find a way to grab the file directly)
Here’s the relevant lines in my /config/configuration.yaml
:
frontend:
extra_html_url:
- /local/custom_ui/state-card-custom-ui.html
homeassistant:
# customize: !include customize.yaml <- My old method of customization
customize_glob:
switch.ventilateursalonalimentation:
custom_ui_state_card: state-card-custom-ui
templates:
icon: "return 'mdi:fan';"
icon_color: "if (state == 'unavailable') return 'rgb(193,193,193)'; else if (entities['input_number.ventilateur_salon_speed'].state < 1.0) return 'rgb(54, 95, 140)'; else if
custom_ui_state_card: state-card-custom-ui
makes no difference wether it’s their or not.
When I click the fan icon, its color changes from its off color to yellow, then back to its off color. Before, the fan color would change to the color defined for that speed. It’s not just that one item that it doesn’t work, all my customized icons are no longer changing their color correctly.
Here’s a simpler one that also doesn’t work:
remote.harmony_hub:
custom_ui_state_card: state-card-custom-ui
templates:
icon: "if (state == 'on') return 'mdi:television'; else return 'mdi:television-off';"
icon_color: "if (state == 'unavailable') return 'rgb(193,193,193)'; else if (state == 'on') return 'rgb(251,210,41)'; else return 'rgb(54, 95, 140)';"
This used to work perfectly before this dreaded 0.110 update
Thanks for your help