HI,
Is there any way to get a gauge to blink when in certain %? I’m trying to get my solar battery gauge card to blink when below 20%, and gauge card to blink when consumption is more than 6kw/h.
Welcome, you’ll need the Card Mod addon
type: gauge
entity: input_number.test3
card_mod:
style: |
ha-card {
{% if states('input_number.test3') | int <= 20 %}
animation: blink 2s linear infinite;
{% endif %}
}
@keyframes blink {
100% {opacity: 0;}
}
refer and post to this thread if you choose to install Card Mod
Thank you so much, new to Ha with no coding experience, so every day is a learning curve. Is there a way that I can change the background color to blink red? Once again…THANK YOU!!!
Yes
type: gauge
entity: input_number.test3
card_mod:
style: |
ha-card {
{% if states('input_number.test3') | int <= 20 %}
animation: blink 2s linear infinite;
background: red;
{% endif %} }
@keyframes blink {
100% {opacity: 0;}
}
Thank you, works 100%. I hope I will be able to be of help to someone to, in the future!
2 Likes