Advertisement
fablav

Vacuum animation

Apr 14th, 2025
442
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.55 KB | Software | 0 0
  1.  
  2.  
  3. Idk how to make code blocks pretty on Facebook, if that’s possible.
  4.  
  5. Vacuum Keyframes and YAML for card mod:
  6. card_mod:
  7.       style: |
  8.        ha-icon {
  9.           {% if is_state('vacuum.mr_grimes','cleaning') %}
  10.             --card-mod-icon: mdi:robot-vacuum;
  11.             animation: vacuum 12s ease infinite;
  12.           {% else %}
  13.             --card-mod-icon: mdi:robot-vacuum-off;
  14.           {% endif %}
  15.         }
  16.         .switch-button {
  17.             {% if is_state('vacuum.mr_grimes','cleaning') %}
  18.               background-image: linear-gradient(transparent, rgba(0,255,2,0.2));
  19.             {% else %}
  20.             {% endif %}
  21.         }  
  22.         @keyframes vacuum {
  23.           0%, 5% { transform: translate(0px,0px) rotate(0deg); }
  24.           10% { transform: translate(0px,0px) rotate(90deg); }
  25.           15%, 20% { transform: translate(5px,0px) rotate(90deg); }  
  26.           25% { transform: translate(5px,0px) rotate(0deg); }
  27.           30%, 35% { transform: translate(5px,-5px) rotate(0deg); }
  28.           40% { transform: translate(5px,-5px) rotate(-90deg); }
  29.           45%, 50% { transform: translate(-5px,-5px) rotate(-90deg); }
  30.           55% { transform: translate(-5px,-5px) rotate(-180deg); }
  31.           60%, 65% { transform: translate(-5px,5px) rotate(-180deg); }
  32.           70% { transform: translate(-5px,5px) rotate(-270deg); }
  33.           75%, 80% { transform: translate(0px,5px) rotate(-270deg); }
  34.           85% { transform: translate(0px,5px) rotate(-360deg); }
  35.           90%, 100% {transform: translate(0px,0px) rotate(-360deg); }
  36.         }
Tags: ha
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement