Open cgagliano opened 9 months ago
Hi Carlos,
Can you please double-check that when you cloned the repository it created the folder creative-button-card-templates/
and that it contains all of the folders and .yaml files?
Hey Will,
Thanks for the quick attention. As far as I can see, it did create the folder and it contains all the appropriate files:
Any thoughts?
Hrmmmmm I see, just a few more qualifying questions then:
ui-lovelace.yaml
? creative-button-card-templates
as the other folders/files used by lovelace/HA config? This may include checking the permissions inside the HA docker container, I'm not sure what setup of HA you are running.!include*
elsewhere in your HA yaml config? Hey Will,
Thanks for your continued attention to this. I'll answer the questions to the best of my ability.
Are you able to create a generic button-card yourself without any issue?
Yes
Where is your code located for building your cards? In ui-lovelace.yaml?
The code for each card is in its respective dashboard
Would you mind posting the code of one of your dashboards where you're trying to use the card? (Make sure to remove any private info)
No problem! Posting it at the bottom.
Are the permissions the same for creative-button-card-templates as the other folders/files used by lovelace/HA config? This may include checking the permissions inside the HA docker container, I'm not sure what setup of HA you are running.
All permissions should be the same. I'm not using a Docker container for this setup yet.
Do you use !include* elsewhere in your HA yaml config?
There are various !include statements in the configuration.yaml file. Most of them are in the default files
Dashboard code: button_card_templates: picture_button: aspect_ratio: 1/1 color_type: icon hold_action: action: none layout: vertical show_entity_picture: true show_icon: false show_label: false show_name: false show_state: false styles: card:
Hi again Carlos,
When you say "The code for each card is in its respective dashboard" do you mean each dashboard has it's own yaml file that is included in ui-lovelace.yaml
? Or are you referring to editing the YAML in the Home Assistant UI?
Another thing I noticed is that the first line of your dashboard code is button_card_templates:
which is a potential problem as you already specified that in the ui-lovelace.yaml
correctly and this may be overriding it or confusing it at least.
I had a read over this again and I'm fairly certain the issue is that you are redefining button_card_templates
in your dashboard code when you have already defined it, correctly for using these templates, in ui-lovelace.yaml
.
If you wish to add your own template picture_button
you can add a .yaml
file for it in the creative-button-card-templates/custom/
folder.
Hi Will,
I think I misunderstood your question about the code for each card. I'm brand new to Home Assistant and YAML in general. It does seem like the code you were asking about is in ui-lovelace.yaml. I'd be happy to provide it (or an excerpt) if it'd help.
I did create a brand new testing dashboard and attempted to create a new custom button card with template "title" and was still greeted with the same "Button-card template 'title' is missing!" error.
I also noticed that if I change the first line on my dashboard to anything else, it breaks the "picture_button" items.
Any hope for this, or should I just burn the whole thing down and start over?
Thanks again for your continued attention to this. It's greatly appreciated.
@cgagliano Sorry for the delay on getting back to you here. I just had a look at this with fresh eyes though. Hopefully you still want to try and get it working?
I think I made it a tad confusing because I assumed by the way you asked the question that you are using your dashboards in YAML mode, but I should have asked. Do you have dashboards configured in yaml mode and are editing them in the YAML files or are you editing dashboards within the Home Assistant user interface?
Either way it looks as though you are overriding the button_card_templates:
property which is set in ui-lovelace.yaml
with the one you are setting in the dashboard code you posted above. You can't set this twice. So solutions are:
YAML Mode: If you're using YAML mode and have added the correct code to ui-lovelace.yaml
as you said you have then you can add any .yaml file to the creative-button-card-templates/custom
folder and it will add your custom template in automatically. There's an example in there to help get you started.
UI (Storage) Mode: If you're using the UI then you'll need to paste the code in as per the instructions but you can add your own custom templates either at the top or the bottom of the code that is pasted under button_card_templates:
.
Sorry I didn't pick this up first time round - if you are able to enclose any code you post in a code block (surrounded by three (3) backticks) that would be a massive help moving forward. I'm precious and can't read the code properly without syntax highlighting and formatting, haha.
Hope this isn't too late and helps you to solve the issue.
Hi @wfurphy! Thanks so much for the continued attention to this. And no worries! I understand that we all get busy. In fact, I'm kinda going through it right now. I haven't had a chance to fully review your last message, but I'll take some time this week and I'll keep you posted.
Thanks again!
Hello there,
Wanted to bring up an issue I've been having. I've followed your instructions for installation; from a Home Assistant terminal session I've navigated to where the ui-lovelace.yaml is located and cloned this repository. I've also added the following to the top of my ui-lovelace.yaml file: button_card_templates: !include_dir_merge_named creative-button-card-templates/ Each time that I attempt to use one of the templates, I get the same error:
Button-card template 'title' is missing! type: custom:button-card template: title
Any guidance or direction would be greatly appreciated.
Thanks! Carlos