UI Lovelace Battery Card not working

hi,

i want to use the ui lovelace battery card template called battery_card.
if i configure a custom button like the following:

type: 'custom:button-card'
template: card_battery
entity: sensor.wr1_battery_soc
variables:
   ulm_card_battery_charger_type_entity_id: sensor.wr1_battery_soc
   ulm_card_battery_battery_level_danger: 20
   ulm_card_battery_battery_level_warning: 50
   ulm_card_battery_name: PV Batterie

i get the following error message:

i also tried to paste it into the raw section directly.

so i tried other templates from the ui lovelace site but no one i can get working.
any idea how to fix it or what is missing in my ha system?

thanks!

You must define a template for a button-card before using it. Templates are not something “standard existing predefined”. User creates them. It is described in docs for button-card.

sorry for my question, but can you give me a hint where in the docs i can find these informations?

Docs about using button-card templates - in the button-card GitHub repo.
Also, there is a huge dedicated thread for the button-card where similar questions may be discussed with plenty of users.