UI Lovelace Battery Card not working

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.