Hi,
I am very new to this amazing SW. I have been trying for weeks now to create a cutom button card for my front door a Homematic keymatic door lock. My need to to show the door lock with a icon of my choice for closed and open plus an associated colour.
So far for all my other switches etc I have managed to get a template to work but not for the door lock.
It appears that the lock comes with “embedded” info, icon and colour.
I have used all possible words, boolean, etc for the open or closed states in the template, in order to take on my icons and clours with no luck.
Currentley in the example are shown the states that the lock issues for open and closed. (they are in German).
If someone could give a steer where I have gone wrong I would appreciate the help.
Many thanks
Andy
type: custom:button-card
entity: lock.homematicip_local_qeq1570411_1
tap_action:
action: toggle
state:
- operator: template
value: >-
[[[ return states["lock.homematicip_local_qeq1570411_1"].state ===
"gesperrt" ]]]
color: rgb(255,295,0)
icon: mdi:door
- operator: template
value: >-
[[[ return states["lock.homematicip_local_qeq1570411_1"].state ===
"entsperrt" ]]]
color: rgb(33,139,34)
icon: mdi:door-open
show_state: false
name: Front
size: 50px