#changes to custom_card templates don't update in dash even with HA restart

1 messages · Page 1 of 1 (latest)

zenith bridge
#

I have a custom:button-card with template card_aa_light - I've made some changes to the template custom_card_aa_light.yaml but they haven't updated in HA even with a restart. I cleared my cache and did a hard refresh too but no luck.

This used to happen when I used UI Minimalist as well and the solution was to reload the minimalist integration everytime before reloading the dashboard and that would update. In this case, I'm not sure how to go about it as I'm not using any sort of integration.

quaint night
#

Are there any related errors being thrown in the logs?

opal holly
#

3 dots in the corner

#

reload

zenith bridge
#

the file structure is as follows:

ui_rounded
├── custom_cards
│ └── custom_card_aa_light
│ └── custom_card_aa_light.yaml
└── dashboard
├── views
│ └── home.yaml
└── ui-lovelace.yaml

#

it reads the card but there's an issue with it and i can't make any updates at the moment. i can't seem to find any documentation about this online either other than from someone who had experienced it with minimalist

zenith bridge
orchid shell
#

I thought I posted a message in here the other day, but I guess not.
For me, I've noticed when I make changes to my YAML, not only do I have to save the template file (or other secondary files), but I also have to save the dashboard file (even if no changes were made.) I also have to give it a couple of seconds to get everything to "click into place" before I refresh the dashboard.

zenith bridge
#

so you have to re-save ui-lovelace.yaml?

zenith bridge
#

doesn't seem to work for me

#

for now I can keep working by having the template written out in the actual yaml file instead but it becomes really really messy as the template is big

orchid shell
#

I don't use ui-lovelace.yaml. For me, the dashboard is viewsonic.yaml with the !includes for the button-card-templates.yaml and header.yaml. Even if I change something in one of the includes, I still have to save the viewsonic.yaml even if there were no changes made. Granted, it could be a caching issue on my side. Perhaps, Firefox notices the viewsonic.yaml hasn't changed and doesn't reload it which, subsequently, doesn't reload the !includes.
(My template file is 500-something lines long with one template is about 90 lines which relies on another template that is about 40 lines so I understand about long templates.)

zenith bridge
#

I see, not sure if I'm going about it wrong then.

#

Mine is ui-lovelace.yaml

opal holly
#

I use lovelace gen, which allows you to programatically generate your dashboard. It essentially generates yaml. I have no issues with any nested files. I simply reload with a single change using ui-lovelace.ymal

zenith bridge
regal forge
#

Immediate change /effect visible

#

Only the custom:sidebar plugin requires a refresh And a reload of the views but that is another resource altogether

zenith bridge
regal forge
#

well, yes, could be.. then again, they cant work for some, and not work for others. simple test: delete comment out the templates file, and see what happens

#

the templates file needs to be referenced using the following syntax, per dashboard, as is described in the documentation:```
button_card_templates: !include_dir_merge_named ../button_card_templates

views:

  • !include ui-overzicht/view_overzicht_Welkom.yaml
    etcetc
if you have more dashboards, and do not reference the button_card_templates in all of them they wont get loaded on those dashboards
#

ofc you can also use a hard coded path, in stead of the relative path. As long as it points to the folder you use

button_card_templates: /config/dashboard/button_card_templates
#

then again, if it cant find the template the button-card will throw an error in your view, not to be missed. Also, you cant compare to Minimalist, because even though that is basically button-card, it's an integration of its own, unlike button-card.

#

this happens when you don't load the templates in a dashboard..... is that what youre seeing?