How to add template for button-card?

Hi, I’m still new in HA.

Recently, I wanna customise my HA dashboard, refer to some idea in the community.

the below code I want to add to my dashboard, then I click 3 dots and select raw configuration editor.

Once I’ve pasted, the error "missing template: light " come out.

            - entity: light.table
              type: custom:button-card
              style:
                left: 84.3%
                top: 25.7%
              template:
                - light

I think I should copy the “light” template codes as well, but I don’t know where I should paste to. The code author put the templates in “button_card_templates.yaml” which links to “ui-lovelace.yaml”.
I’m usiing UI mode not yaml mode. Anyone could tell me where I should paste this code to ?

Thanks, sorry to my English.

I’ve solved. Just paste this code to raw configuration editor with starting from button_card_templates:

Hi,
can you indicate all the steps where to paste the code I am not finding it.