mysash
(Sascha)
September 26, 2024, 7:49am
1
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.
mysash
(Sascha)
October 5, 2024, 6:55pm
4
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.
Button card
Lovelace Button card for your entities. -> github
[all]
Features
works with any toggleable entity
3 actions on tap toggle, more_info and service
state display (optional)
custom color for on and off state (optional)
custom state definition with customizable color (optional)
custom size (optional)
custom icon (optional)
custom css style (optional)
automatic color for light (optional)
custom default color for lights (when color cannot be determined) (optional)
2 color types
icon :…