button-card icon indicating copy to clipboard operation
button-card copied to clipboard

add template to lovelace config

Open fontexD opened this issue 2 years ago • 1 comments

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?

fontexD avatar Dec 25 '22 13:12 fontexD

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

uvjim avatar Feb 09 '23 18:02 uvjim