Must confess I am not 100% positive, but this will have to do with using yaml mode or not. If you don’t use yaml mode, (you use the GUI for changing Lovelace) adding resources will automatically load them.
thanks again. I beleive it has to do with the path to reach the file. For information my UI version is 20201229.1 on a 2021.1.0 version HA.
I didn’t have the www folder and created the whole www/lovelace/ressources/custom_ui path to put in the last given custom-ui.js (and removed the old one).
not sure about the way HA reads the /local… path.
I declared /local/lovelace/resources/custom-ui/custom-ui.js without effect so I just changed to the real full path /homeassistant-conf/www/lovelace/resources/custom_ui/custom-ui.js, but still no effect.
I’m not in yaml mode for lovelace that’s why I cant’t access the reload_resources service.
be precise: use the exact same folder name as you declare in the path: either custom-ui or custom_ui … right now, you use the one in the path and the other in the folder
Really @Mariusthvdb did a wonderfull job with his JavaScript version of Custom-UI.
I’m now very pleased with my lovelace look.
The only thing I stil don’t manage to customize are the persons badges on top of lovelace.
I defined themes in a themes.yaml file:
green_badge:
label-badge-red: green
label-badge-border-color: lightgrey
label-badge-background-color: white
label-badge-text-color: green
red_badge:
label-badge-red: grey
label-badge-border-color: lightgrey
label-badge-background-color: white
label-badge-text-color: red
The theme file is included in my configuration.yaml :
Sorry but no, themes don’t work anymore, and haven’t found an edit to reinstate that functionality in Lovelace yet. Remember this was designed for States…
You can use card-mod for badges and I will post an example when I am back at my desk.
Cheers! back
we might have to ask Thomas Loven or Kendell about this, since they wont be reading along here
see 🔹 Card-mod - Super-charge your themes! for the relevant thread
I understand the syntax (never used the &myvariable/*myvariable scheme before) and discover the config.entity possibility. Have to read a bit about that config.entity way of doing.
HA is an infinite montain of knew knowledge for me
yeah these are Yaml Anchors, and can be defined ‘on the fly’ so to speak. Anything written after the definition character <<: &anchor_name will be copied (‘merged’ in anchor lingo) when you put <<: *anchor_name
anchors are defined per yaml file. Meaning, if you need the same anchor in another file you need to recreate it first.