Advertisement
fabrizio97726

card riscaldamento + batterie

Dec 30th, 2023
1,280
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 3.71 KB | None | 0 0
  1. type: horizontal-stack
  2. cards:
  3.   - type: custom:mushroom-template-card
  4.     icon: mdi:radiator
  5.     icon_color: '{{ ''red'' if is_state(entity, ''on'') else ''disabled'' }}'
  6.     primary: ''
  7.     secondary: Richiesta media {{ states('sensor.heating_medio') }} %
  8.     entity: binary_sensor.caldaia
  9.     tap_action:
  10.       action: navigate
  11.       navigation_path: /iphone-riscaldamento/0
  12.     fill_container: true
  13.     layout: vertical
  14.     card_mod:
  15.       style:
  16.         mushroom-shape-icon$: |
  17.           ha-icon {
  18.             {{ '--icon-animation: rotation 1s linear infinite;' if is_state(config.entity, 'on') }}
  19.             transform-origin: 29% 88%;
  20.           }
  21.           @keyframes clip {
  22.             0% {
  23.               clip-path: inset(50% 0 0 0);
  24.             }
  25.             100% {
  26.               clip-path: inset(0 0 0 0);
  27.             }
  28.           }
  29.           .shape {
  30.             --shape-animation: ping 2s infinite;
  31.           }
  32.           @keyframes ping {
  33.             0% {
  34.               box-shadow: 0 0 0 0 rgba(var(--rgb-red), 0.7);
  35.             }
  36.            
  37.             70% {
  38.               box-shadow: 0 0 0 10px transparent;
  39.             }
  40.            
  41.             100% {
  42.               box-shadow: 0 0 0 0 transparent;
  43.             }
  44.           ha-card {
  45.             background-color: rgba(0,0,0,0);
  46.             box-shadow: none;
  47.             border-style: hidden;
  48.           }        
  49.   - type: custom:mushroom-template-card
  50.     icon: mdi:battery-high
  51.     primary: null
  52.     icon_color: green
  53.     secondary: >-
  54.       {{ states('sensor.iphone_13_battery_level') | round(0) }}% iPhone  | {{
  55.       states('sensor.ipad_490_battery_level') | round(0) }}% iPad
  56.     layout: vertical
  57.     tap_action:
  58.       action: navigate
  59.       navigation_path: /lovelace-casa2/iphone-13
  60.     double_tap_action:
  61.       action: navigate
  62.       navigation_path: /lovelace-casa2/andrea
  63.     card_mod:
  64.       style:
  65.         mushroom-shape-icon$: |
  66.          .shape {
  67.             background: radial-gradient(var(--card-background-color) 60%, transparent 0%), conic-gradient(rgb(var(--rgb-{{ config.icon_color }})) {{ states('sensor.iphone_13_battery_level') }}% 0%, var(--card-background-color) 0% 100%);
  68.           }
  69.           .shape:before {
  70.             content: "";
  71.             background: radial-gradient(var(--card-background-color) 60%, transparent 0%), conic-gradient(rgb(var(--rgb-teal)) {{ states('sensor.ipad_490_battery_level') }}% 0%, var(--card-background-color) 0% 100%);
  72.             position: absolute;
  73.             border-radius: var(--icon-border-radius);
  74.             width: 81%;
  75.             height: 81%;
  76.           }
  77.           .shape:after {
  78.             content: "";
  79.             height: 100%;
  80.             width: 100%;
  81.             position: absolute;
  82.             border-radius: var(--icon-border-radius);
  83.             background: rgba(var(--rgb-{{ config.icon_color }}), 0.2);
  84.           }
  85. card_mod:
  86.   style:
  87.     mushroom-shape-icon$: |
  88.       ha-icon {
  89.         {{ '--icon-animation: rotation 1s linear infinite;' if is_state(config.entity, 'on') }}
  90.         transform-origin: 29% 88%;
  91.       }
  92.       @keyframes clip {
  93.         0% {
  94.           clip-path: inset(50% 0 0 0);
  95.         }
  96.         100% {
  97.           clip-path: inset(0 0 0 0);
  98.         }
  99.       }
  100.       .shape {
  101.         --shape-animation: ping 2s infinite;
  102.       }
  103.       @keyframes ping {
  104.         0% {
  105.           box-shadow: 0 0 0 0 rgba(var(--rgb-red), 0.7);
  106.         }
  107.        
  108.         70% {
  109.           box-shadow: 0 0 0 10px transparent;
  110.         }
  111.        
  112.         100% {
  113.           box-shadow: 0 0 0 0 transparent;
  114.         }
  115.       ha-card {
  116.         background-color: rgba(0,0,0,0);
  117.         box-shadow: none;
  118.         border-style: hidden;
  119.       }        
  120.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement