Advertisement
raidolo

Ha card docker monitorin

Jun 10th, 2025
1,004
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 2.91 KB | None | 0 0
  1. type: custom:stack-in-card
  2. cards:
  3.   - type: custom:button-card
  4.     entity: sensor.docker_jellyfin_jellyfin1_cpu
  5.     icon: mdi:jellyfish
  6.     entity_picture: /local/images/jellyfin.png
  7.     show_entity_picture: true
  8.     name: Jellyfin
  9.     styles:
  10.       card:
  11.         - border-style: none
  12.         - box-shadow: 0px 0px 10px -9px black
  13.       custom_fields:
  14.         temp:
  15.           - filter: opacity(100%)
  16.           - justify-self: start
  17.           - margin-left: 10px
  18.           - margin-top: 20px
  19.           - padding-bottom: 10%
  20.           - font-size: 65%
  21.         graph:
  22.           - padding-top: 0%
  23.           - width: 100%
  24.           - height: 100%
  25.           - margin-bottom: "-3%"
  26.       icon:
  27.         - width: 25px
  28.         - color: auto
  29.         - margin-right: 10px
  30.         - margin-top: 5px
  31.       name:
  32.         - font-size: 90%
  33.         - font-weight: var(--mcg-title-font-weight, 500)
  34.         - justify-self: start
  35.         - margin-top: 20px
  36.         - margin-left: 10px
  37.         - margin-bottom: 10px
  38.         - opacity: 0.65
  39.         - text-align: center
  40.       grid:
  41.         - grid-template-areas: "\"n i\" \"temp temp\" \"graph graph\""
  42.         - grid-template-columns: 1fr min-content
  43.         - grid-template-rows: 1fr min-content min-content min-content
  44.     custom_fields:
  45.       temp: |
  46.        [[[
  47.           return `<ha-icon
  48.             icon="mdi:cpu-64-bit"
  49.             style="width:18px; height: 18px; color:#ff8c00;">
  50.             </ha-icon><span style="font-size:120%; font-weight: 300;">
  51.             ${states['sensor.docker_jellyfin_jellyfin1_cpu'].state}%</span>
  52.             <ha-icon
  53.             icon="mdi:memory"
  54.             style="width: 18px; height: 18px; color: #3399ff;">
  55.             </ha-icon><span style="font-size:120%; font-weight: 300; text-align: center;">
  56.             ${states['sensor.docker_jellyfin_jellyfin1_memory'].state}MiB</span>`
  57.         ]]]
  58.     card_mod:
  59.       style: |
  60.        ha-card {
  61.           z-index: 1;
  62.           height: 100px !important;
  63.         }
  64.   - type: custom:mini-graph-card
  65.     entities:
  66.       - entity: sensor.docker_jellyfin_jellyfin1_cpu
  67.         name: CPU
  68.         color: "#ff8c00"
  69.       - entity: sensor.docker_jellyfin_jellyfin1_memory
  70.         name: Memory
  71.         color: "#3399ff"
  72.         y_axis: secondary
  73.     height: 50
  74.     hours_to_show: 24
  75.     line_width: 3
  76.     font_size: 50
  77.     animate: true
  78.     show:
  79.       name: false
  80.       icon: false
  81.       state: false
  82.       legend: false
  83.       fill: fade
  84.     card_mod:
  85.       style: |
  86.        ha-card {
  87.           position: absolute !important;
  88.           height: 100%;
  89.           width: 100%;
  90.           top: 0px;
  91.           --ha-card-border-width: 0;
  92.         }
  93.         ha-card:after {
  94.           content: "";
  95.           position: absolute;
  96.           width: 100%;
  97.           height: 100%;
  98.           background: linear-gradient(to right, var(--card-background-color) 20%, transparent);
  99.         }
  100.  
Advertisement
Comments
Add Comment
Please, Sign In to add comment
Advertisement