ohadbenita
(Ohad Benita)
October 20, 2025, 6:09pm
1
Hi, trying to add lock battery information to a mushroom lock card, have tried card-mod to no avail, would appreciate any help with this, this is the basic configuration I got so far:
type: custom:mushroom-lock-card
entity: lock.entrance_door
secondary_info: last-changed
double_tap_action:
action: more-info
hold_action:
action: url
url_path: http://192.168.1.167
ohadbenita
(Ohad Benita)
October 22, 2025, 8:41am
2
Ended up with this solution which is sufficient for my needs:
type: custom:mushroom-lock-card
entity: lock.entrance_door
secondary_info: last-changed
double_tap_action:
action: more-info
hold_action:
action: url
url_path: http://192.168.1.167
card_mod:
style: |
ha-state-icon {
{% set battery = states('sensor.entrance_door_battery_level') | int %}
{% if battery <= 20 %}
color: yellow;
animation: blink 1s infinite;
{% elif battery <= 10 %}
color: red;
animation: blink 1s infinite;
{% else %}
animation: none;
{% endif %}
}
@keyframes blink {
0%, 100% { opacity: 1; }
50% { opacity: 0.2; }
}
Used some ideas from this great community post