Hi all,
i’m in home assistant for about 10 months now and really enjoying it!!
For one of my dashboards i want to show certain states on my wallpanel.
The case:
I have a horizontal stack with mushroom chips, each chip for a diferent state with a color changing icon. i got this working with template chips and is working exacly as planed.
I would like the chips to blink when they are in a certain state, for example:
i have a chip that when the waterpressure from the central heating drops below 1,6 bar the chip turns red and i get every hour a notification on my phone, when i single click the chip it toggles the automation on/off so it stops nagging me all day, when the automation is off the icon turns yellow.
I would like the icon to also blink when the automation is off
If i put the following in the yaml all the chips start to blink when the state is true
card_mod:
style: |
{% if is_state(‘automation.notify_cv_druk_laag’,‘off’) %}
ha-card { animation: blink 1s linear infinite; }
@keyframes blink { 50% {opacity: 0;} }
{%- endif %}
any thoughts?
kind regard Kevin
ps: i’m from the netherlands, so sorry if my english isn’t always correct.
My current yaml:
type: custom:mushroom-chips-card
chips:
- type: template
tap_action:
action: call-service
service: automation.toggle
target:
entity_id: automation.notify_cv_druk_laag
entity: input_boolean.status_cv_chip
icon: mdi:water-boiler-alert
icon_color: >-
{{ 'red' if states('input_boolean.status_cv_chip') == 'on' else 'yellow'
if states ('automation.notify_cv_druk_laag') == 'off' else 'null' }}
hold_action:
action: call-service
service: automation.trigger
target:
entity_id: automation.verwarming_naar_19
data:
skip_condition: true
- type: template
icon: mdi:vacuum
icon_color: >-
{{ 'white' if states('counter.stofzuig_counter') == '0' else 'green' if
states('counter.stofzuig_counter') == '1' else 'yellow' if
states('counter.stofzuig_counter') == '2' else 'red' if
states('counter.stofzuig_counter') == '3' }}
hold_action:
action: none
tap_action:
action: more-info
entity: counter.stofzuig_counter
- type: template
icon_color: >-
{{ 'white' if states('counter.vuilnis') == '0' else 'green' if
states('counter.vuilnis') == '1' else 'yellow' if
states('counter.vuilnis') == '2' else 'red' if states('counter.vuilnis')
== '3' }}
icon: phu:garbage-residual
entity: counter.vuilnis
alignment: center