custom-cards / button-card

❇️ Lovelace button-card for home assistant
MIT License
1.91k stars 232 forks source link

add template to lovelace config #642

Open fontexD opened 1 year ago

fontexD commented 1 year ago

im trying to add a template but whatever i do it keep saying it cant find my template i created ?

ive uploaded the config

https://ibb.co/TkkCYxK

what am i doing wrong?

uvjim commented 1 year ago

I noticed in your screenshot that you had the button_card_templates at the view level. It should be at the root level of the document. Once there you should be able to use the templates.

Something like this.

button_card_templates:
  header:
    styles:
      card:
        - padding: 5px 15px
views:
  - theme: Backend-selected
    title: Shopping List
    path: shooping-list
    badges: []
    cards:
      - type: custom:button-card
        template: header
        name: My Test Header