Advertisement
fablav

Mushroom icona luci

Mar 15th, 2024
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.96 KB | Software | 0 0
  1. type: custom:mushroom-template-card
  2. primary: ''
  3. secondary: ''
  4. icon: |
  5.  {% if states('sensor.luci_accese')|int >= 1 %}
  6.     {{ 'mdi:numeric-' + states('sensor.luci_accese') + '-circle' }}
  7.   {%- else -%}
  8.     mdi:lightbulb
  9.   {% endif %}
  10. icon_color: |
  11.  {% if states('sensor.luci_accese')|int >= 1 %}
  12.     yellow
  13.   {% else %}
  14.     disabled
  15.   {% endif %}
  16. badge_icon: |
  17.  {% if states('sensor.luci_accese')|int >= 1 %}
  18.     mdi:lightbulb-on
  19.   {% else %}
  20.   {% endif %}
  21. badge_color: yellow
  22. layout: horizontal
  23. tap_action:
  24.   action: none
  25. card_mod:
  26.   style:
  27.     mushroom-shape-icon$: |
  28.      .shape {
  29.         {% if states('sensor.luci_accese')|int >= 1 %}
  30.           --shape-color: rgba(var(--rgb-red), 0.4);
  31.         {%- else -%}
  32.         {% endif %}
  33.         box-shadow: 0px 2px 4px 0px rgba(0,0,0,0.36) !important;
  34.       }
  35.     .: |
  36.      ha-card:active {
  37.         transform: translateY(1.5px);
  38.         transition: 0s;
  39.       }
  40.       ha-card {
  41.         transform: scale(1.3);
  42.         border: none;
  43.         box-shadow: none;
  44.         padding-left: 0px;
  45.         background: rgba(0,0,0,0);
  46.       }
  47.       ha-state-icon {
  48.         {% if states('sensor.luci_accese')|int >= 1 %}
  49.           animation: alarm 3s ease infinite;
  50.         {%- else -%}
  51.          
  52.         {% endif %}
  53.       }
  54.       @keyframes alarm {
  55.         0%, 80%, 100% { transform: translateY(0); }
  56.         10% { transform: translateY(-2px) rotate(-27deg); }
  57.         20% { transform: translateY(-2px) rotate(21deg); }
  58.         30% { transform: translateY(-2px) rotate(-15deg); }
  59.         40% { transform: translateY(-2px) rotate(9deg); }
  60.         50% { transform: translateY(0); }
  61.         60% { transform: translateY(-1.2px) }
  62.       }
  63.       mushroom-badge-icon {
  64.         #--badge-icon-size: 10px;
  65.         --icon-color: red;
  66.         animation: wobbling 0.7s linear infinite alternate;
  67.       }
  68.       @keyframes wobbling {
  69.       0% {transform: rotate(-20deg);}
  70.       100% {transform: rotate(20deg);}
  71.       }
  72.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement