Advertisement
mohammadqatanani

Untitled

Jun 29th, 2024
507
0
362 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 2.55 KB | None | 0 0
  1. type: custom:mod-card
  2. card:
  3.   type: custom:fluid-level-background-card
  4.   card:
  5.     show_name: true
  6.     show_icon: true
  7.     show_state: false
  8.     type: glance
  9.     entities:
  10.       - entity: valve.khzn_1_switch_1
  11.         tap_action:
  12.           action: toggle
  13.         double_tap_action:
  14.           action: more-info
  15.     state_color: false
  16.   full_value: 100
  17.   severity:
  18.     - color:
  19.        - 3
  20.         - 169
  21.         - 244
  22.       value: 60
  23.   entity: sensor.accent_battery_level
  24.   show-bubbles: true
  25.   bubbles-color: white
  26. style: |
  27.  ha-card {
  28.     position: relative;
  29.     overflow: hidden;
  30.   }
  31.   .bubble {
  32.     position: absolute;
  33.     bottom: 0;
  34.     width: 20px;
  35.     height: 20px;
  36.     background: rgba(255, 255, 255, 0.7);
  37.     border-radius: 50%;
  38.     opacity: 0.5;
  39.     animation: rise 5s infinite;
  40.   }
  41.   @keyframes rise {
  42.     0% {
  43.       transform: translateY(0);
  44.       opacity: 0.5;
  45.     }
  46.     50% {
  47.       transform: translateY(-200px);
  48.       opacity: 0.7;
  49.     }
  50.     100% {
  51.       transform: translateY(-400px);
  52.       opacity: 0;
  53.     }
  54.   }
  55.   .bubble:nth-child(1) {
  56.     left: 10%;
  57.     animation-delay: 0s;
  58.   }
  59.   .bubble:nth-child(2) {
  60.     left: 30%;
  61.     animation-delay: 2s;
  62.   }
  63.   .bubble:nth-child(3) {
  64.     left: 50%;
  65.     animation-delay: 4s;
  66.   }
  67.   .bubble:nth-child(4) {
  68.     left: 70%;
  69.     animation-delay: 1s;
  70.   }
  71.   .bubble:nth-child(5) {
  72.     left: 90%;
  73.     animation-delay: 3s;
  74.   }
  75. extra_styles: |
  76.  <style>
  77.     .bubble {
  78.       position: absolute;
  79.       bottom: 0;
  80.       width: 20px;
  81.       height: 20px;
  82.       background: rgba(255, 255, 255, 0.7);
  83.       border-radius: 50%;
  84.       opacity: 0.5;
  85.       animation: rise 5s infinite;
  86.     }
  87.     @keyframes rise {
  88.       0% {
  89.         transform: translateY(0);
  90.         opacity: 0.5;
  91.       }
  92.       50% {
  93.         transform: translateY(-200px);
  94.         opacity: 0.7;
  95.       }
  96.       100% {
  97.         transform: translateY(-400px);
  98.         opacity: 0;
  99.       }
  100.     }
  101.     .bubble:nth-child(1) {
  102.       left: 10%;
  103.       animation-delay: 0s;
  104.     }
  105.     .bubble:nth-child(2) {
  106.       left: 30%;
  107.       animation-delay: 2s;
  108.     }
  109.     .bubble:nth-child(3) {
  110.       left: 50%;
  111.       animation-delay: 4s;
  112.     }
  113.     .bubble:nth-child(4) {
  114.       left: 70%;
  115.       animation-delay: 1s;
  116.     }
  117.     .bubble:nth-child(5) {
  118.       left: 90%;
  119.       animation-delay: 3s;
  120.     }
  121.   </style>
  122.   <div class="bubbles-container">
  123.     <div class="bubble"></div>
  124.     <div class="bubble"></div>
  125.     <div class="bubble"></div>
  126.     <div class="bubble"></div>
  127.     <div class="bubble"></div>
  128.   </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement