type: custom:mushroom-template-card
entity: switch.pgm_homeassistant_on
primary: >
{% if is_state('switch.pgm_homeassistant_on', 'on') %} PANIC {% elif
is_state('switch.pgm_homeassistant_on', 'off') %} PANIC {% endif %}
secondary: ''
icon: >
{% if is_state('switch.pgm_homeassistant_on', 'on') %} mdi:alert {% elif
is_state('switch.pgm_homeassistant_on', 'off') %} mdi:alert-outline {% endif
%}
icon_color: >
{% if is_state('switch.pgm_homeassistant_on', 'on') %} red {% elif
is_state('switch.pgm_homeassistant_on', 'off') %} red {% endif %}
hold_action:
action: none
double_tap_action:
action: none
tap_action:
action: toggle
fill_container: true
layout: vertical
card_mod:
style: |
ha-card {
border-radius: 20px;
min-height: 10px;
padding-top: 3px !important;
padding-bottom: 3px !important;
{% if is_state('switch.pgm_homeassistant_on', 'on') %}
animation: borderPulse 1s ease-out infinite;
{% endif %}
}
@keyframes borderPulse {
50% {
box-shadow: 0 0 50px red;
}
}
:host {
--mush-icon-size: 30px;
--mush-card-primary-font-size: 12px;
--mush-icon-symbol-size: 1.2em
}