Advertisement
fablav

codicillo stanze

Jan 18th, 2025
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 3.34 KB | Software | 0 0
  1. type: custom:stack-in-card
  2. cards:
  3.   - type: custom:button-card
  4.     show_icon: false
  5.     name: Soggiorno
  6.     styles:
  7.       card:
  8.         - padding: 0 3%
  9.         - z-index: 1
  10.         - height: 95px
  11.       custom_fields:
  12.         btn:
  13.           - justify-self: end
  14.         temp:
  15.           - filter: opacity(100%)
  16.           - justify-self: start
  17.           - font-size: 65%
  18.       name:
  19.         - font-size: 87%
  20.         - font-weight: var(--mcg-title-font-weight, 500)
  21.         - justify-self: start
  22.         - opacity: 0.65
  23.       grid:
  24.         - grid-template-areas: "\"n btn\" \"temp temp\""
  25.         - grid-template-columns: 1fr fit-content
  26.         - grid-template-rows: min-content min-content
  27.     custom_fields:
  28.       temp: |
  29.        [[[
  30.           return `<ha-icon
  31.             icon="mdi:thermometer"
  32.             style="width:18px; height: 18px; color:#ff8c00;">
  33.             </ha-icon><span style="font-size:120%; font-weight: 300;">
  34.             ${states['sensor.temperatura_soggiorno'].state}°C </span>
  35.             <ha-icon
  36.             icon="mdi:water-percent"
  37.             style="width: 18px; height: 18px; color: #3399ff;">
  38.             </ha-icon><span style="font-size:120%; font-weight: 300; text-align: center;">
  39.             ${states['sensor.umidita_soggiorno'].state}%</span>`
  40.         ]]]
  41.       btn:
  42.         card:
  43.           type: custom:mushroom-chips-card
  44.           chips:
  45.             - type: light
  46.               entity: light.luce_soggiorno
  47.               content_info: none
  48.               card_mod:
  49.                 style: |
  50.                  ha-card {
  51.                     border: none !important;
  52.                   }
  53.             - type: light
  54.               entity: light.lampada_soggiorno
  55.               content_info: none
  56.               card_mod:
  57.                 style: |
  58.                  ha-card {
  59.                     border: none !important;
  60.                   }
  61.             - type: light
  62.               entity: light.led_soggiorno
  63.               content_info: none
  64.               card_mod:
  65.                 style: |
  66.                  ha-card {
  67.                     border: none !important;
  68.                   }
  69.           alignment: end
  70.           card_mod:
  71.             style: |
  72.              ha-card {
  73.                 border: none !important;
  74.                 --chip-background: none;
  75.                 --chip-box-shadow: none;
  76.               }
  77.               .chip-container {
  78.                 --chip-spacing: 1.5vh;
  79.               }
  80.   - type: custom:mini-graph-card
  81.     entities:
  82.       - entity: sensor.temperatura_soggiorno
  83.         name: Temperature
  84.         color: "#ff8c00"
  85.       - entity: sensor.umidita_soggiorno
  86.         name: Humidity
  87.         color: "#3399ff"
  88.         y_axis: secondary
  89.     height: 50
  90.     hours_to_show: 24
  91.     line_width: 3
  92.     font_size: 50
  93.     animate: true
  94.     show:
  95.       name: false
  96.       icon: false
  97.       state: false
  98.       legend: false
  99.       fill: fade
  100.     card_mod:
  101.       style: |
  102.        ha-card {
  103.           position: absolute !important;
  104.           height: 100%;
  105.           width: 100%;
  106.           top: 0px;
  107.           --ha-card-border-width: 0;
  108.         }
  109.         ha-card:after {
  110.           content: "";
  111.           position: absolute;
  112.           width: 100%;
  113.           height: 100%;
  114.           background: linear-gradient(to right, var(--card-background-color) 20%, transparent);
  115.         }
  116.  
Tags: ha
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement