Advertisement
fablav

Room Card Minimalistic Style 2 colonne

Feb 29th, 2024 (edited)
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 8.79 KB | Software | 0 0
  1. type: custom:button-card
  2. name: Soggiorno
  3. icon: mdi:sofa
  4. entity: light.soggiorno
  5. show_state: false
  6. show_label: true
  7. label: |
  8.  [[[
  9.     return Math.round(states['sensor.broadlink_rm4_soggiorno_temperature'].state) + "°C" + "<br>" + Math.round(states['sensor.broadlink_rm4_soggiorno_humidity'].state) + " %";
  10.   ]]]
  11. tap_action:
  12.   action: none
  13. double_tap_action:
  14.   action: toggle
  15. custom_fields:
  16.   btn:
  17.     card:
  18.       type: custom:mushroom-chips-card
  19.       chips:
  20.         - type: template
  21.           tap_action:
  22.             action: toggle
  23.           entity: light.soggiorno
  24.           icon: |
  25.            {% if is_state(entity, 'on') %}
  26.               mdi:lightbulb-on
  27.             {% else %}
  28.               mdi:lightbulb-outline
  29.             {% endif %}
  30.           icon_color: |
  31.            {% if is_state(entity, 'on') %}
  32.               black
  33.             {% else %}
  34.              
  35.             {% endif %}
  36.         - type: template
  37.           tap_action:
  38.             action: more-info
  39.           entity: vacuum.vacky
  40.           icon: mdi:vacuum
  41.         - type: template
  42.           tap_action:
  43.             action: toggle
  44.           entity: entita.radiatore
  45.           icon: |
  46.            {% if is_state(entity, 'on') %}
  47.               mdi:radiator
  48.             {% else %}
  49.               mdi:radiator-disabled
  50.             {% endif %}
  51.           icon_color: |
  52.            {% if is_state(entity, 'on') %}
  53.               yellow
  54.             {% else %}
  55.  
  56.             {% endif %}
  57.       card_mod:
  58.         style:
  59.           mushroom-template-chip:nth-child(1)$:
  60.             mushroom-chip$: |
  61.              ha-card {
  62.                 --chip-background: {{ 'rgba(235, 204, 52, 1)' if is_state('light.soggiorno', 'on') else 'rgba(1235, 204, 52, 0.3)' }};
  63.                 animation: {{ 'ping 2s ease-out infinite' if is_state('light.soggiorno', 'on') }};
  64.                 padding: 5px !important;
  65.                 border-radius: 100px !important;
  66.               }
  67.               @keyframes ping {
  68.                 0% {
  69.                   box-shadow: 0 0 5px 1px rgba(var(--rgb-amber), 1);
  70.                 }
  71.                 100% {
  72.                   box-shadow: 0 0 5px 10px rgba(var(--rgb-amber), 0);
  73.                 }
  74.               }
  75.               ha-card:active {
  76.                 transform: translateY(1.5px);
  77.                 transition: 0s;
  78.                 box-shadow: 0 0.5px 2px 0 rgba(0, 0, 0, 0.16);
  79.               }
  80.             .: |
  81.              ha-state-icon {
  82.                 animation: {{ 'illumination 2s infinite' if is_state('light.soggiorno', 'on') }};
  83.               }
  84.               @keyframes illumination {
  85.                 0%, 100% { clip-path: inset(0 0 0 0); }
  86.                 95% { clip-path: polygon(0% 99%, 20% 55%, 22% 37%, 39% 20%, 61% 21%, 77% 35%, 79% 57%, 99% 100%); }
  87.               }
  88.           mushroom-template-chip:nth-child(2)$:
  89.             mushroom-chip$: |
  90.              ha-card {
  91.                 --chip-background: {{ 'rgba(166, 207, 152, 0.3)' if is_state('vacuum.vacky', 'docked') else 'rgba(166, 207, 152, 1)' }};
  92.                 animation: {{ 'ping 2.5s ease-out infinite' if not is_state('vacuum.vacky', 'docked') }};
  93.                 padding: 5px !important;
  94.                 border-radius: 100px !important;
  95.               }
  96.               @keyframes ping {
  97.                 0% {
  98.                   box-shadow: 0 0 5px 1px rgba(166, 207, 152, 1);
  99.                 }
  100.                 100% {
  101.                   box-shadow: 0 0 5px 10px rgba(166, 207, 152, 0);
  102.                 }
  103.             .: |
  104.              ha-state-icon {
  105.                 animation: {{ 'scan 5s ease-in-out infinite' if not is_state('vacuum.vacky', 'docked') }};
  106.               }
  107.               @keyframes scan {
  108.                 0%, 100% { transform: rotate(20deg); }
  109.                 50% { transform: rotate(-15deg); }
  110.               }
  111.           mushroom-template-chip:nth-child(3)$:
  112.             mushroom-chip$: |
  113.              ha-card {
  114.                 --chip-background: {{ 'rgba(197, 22, 5, 0.8)' if is_state('entita.radiatore', 'on') else 'rgba(197, 22, 5, 0.3)' }};
  115.                 animation: {{ 'ping 2s ease-out infinite' if is_state('entita.radiatore', 'on') }};
  116.                 padding: 5px !important;
  117.                 border-radius: 100px !important;
  118.               }
  119.               @keyframes ping {
  120.                 0% {
  121.                   box-shadow: 0 0 5px 1px rgba(197, 22, 5, 1);
  122.                 }
  123.                 100% {
  124.                   box-shadow: 0 0 5px 10px rgba(197, 22, 5, 0);
  125.                 }
  126.               }
  127.               ha-card:active {
  128.                 transform: translateY(1.5px);
  129.                 transition: 0s;
  130.                 box-shadow: 0 0.5px 2px 0 rgba(0, 0, 0, 0.16);
  131.               }
  132.             .: |
  133.              ha-state-icon {
  134.                 animation: {{ 'clip 1s linear infinite' if is_state('entita.radiatore', 'on') }};
  135.               }
  136.               @keyframes clip {
  137.                 0% {
  138.                 clip-path: inset(50% 0 0 0);
  139.                 }
  140.                 100% {
  141.                 clip-path: inset(0 0 0 0);
  142.               }
  143.   btn1:
  144.     card:
  145.       type: custom:mushroom-chips-card
  146.       chips:
  147.         - type: template
  148.           tap_action:
  149.             action: more-info
  150.           entity: cover.tapparella
  151.           icon: |
  152.            {% if is_state(entity, 'closed') %}
  153.               mdi:window-shutter
  154.             {% else %}
  155.               mdi:window-shutter-open
  156.             {% endif %}
  157.           icon_color: black
  158.         - type: template
  159.           tap_action:
  160.             action: more-info
  161.           entity: binary_sensor.finestra_aperta
  162.           icon: |
  163.            {% if is_state(entity, 'on') %}
  164.               mdi:window-open
  165.             {% else %}
  166.               mdi:window-closed
  167.             {% endif %}
  168.         - type: template
  169.           tap_action:
  170.             action: more-info
  171.           entity: sensor.aria_soggiorno_pm25
  172.           icon: mdi:leaf
  173.           icon_color: black
  174.       card_mod:
  175.         style:
  176.           mushroom-template-chip:nth-child(1)$:
  177.             mushroom-chip$: |
  178.              ha-card {
  179.                 --chip-background: {{ 'rgba(137, 207, 239, 1)' if is_state('cover.tapparella', 'open') else 'rgba(137, 207, 239, 0.3)' }};
  180.                 animation: {{ 'ping 2s ease-out infinite' if is_state('cover.tapparella', 'open') }};
  181.                 padding: 5px !important;
  182.                 border-radius: 100px !important;
  183.               }
  184.               @keyframes ping {
  185.                 0% {
  186.                   box-shadow: 0 0 5px 1px rgba(137, 207, 239, 1);
  187.                 }
  188.                 100% {
  189.                   box-shadow: 0 0 5px 10px rgba(137, 207, 239, 0);
  190.               }
  191.           mushroom-template-chip:nth-child(2)$:
  192.             mushroom-chip$: |
  193.              ha-card {
  194.                 --chip-background: {{ 'rgba(0, 128, 254, 1)' if is_state('binary_sensor.finestra_aperta','on') else 'rgba(0, 128, 254, 0.2)' }};
  195.                 animation: {{ 'ping 2s ease-out infinite' if is_state('binary_sensor.finestra_aperta', 'on') }};
  196.                 padding: 5px !important;
  197.                 border-radius: 100px !important;
  198.               }
  199.               @keyframes ping {
  200.                 0% {
  201.                   box-shadow: 0 0 5px 1px rgba(0, 128, 254, 1);
  202.                 }
  203.                 100% {
  204.                   box-shadow: 0 0 5px 10px rgba(0, 128, 254, 0);
  205.               }
  206.           mushroom-template-chip:nth-child(3)$:
  207.             mushroom-chip$: |
  208.              ha-card {
  209.                 --chip-background: rgba(191, 234, 124, 1);
  210.                 padding: 5px !important;
  211.                 border-radius: 100px !important;
  212.               }
  213. styles:
  214.   grid:
  215.     - grid-template-areas: '"n btn btn1" "l btn btn1" "i btn btn1"'
  216.     - grid-template-columns: 1fr min-content min-content
  217.     - grid-template-rows: min-content min-content 1fr
  218.   img_cell:
  219.     - justify-content: center
  220.     - position: absolute
  221.     - width: 150px
  222.     - height: 150px
  223.     - left: 0
  224.     - bottom: 0
  225.     - margin: 0 0 -30px -30px
  226.     - background: '#FFC47E'
  227.     - border-radius: 200px
  228.   icon:
  229.     - width: 60px
  230.     - color: black
  231.     - opacity: '0.6'
  232.   card:
  233.     - padding: 22px 8px 22px 22px
  234.   custom_fields:
  235.     btn:
  236.       - justify-content: end
  237.       - align-self: start
  238.     btn1:
  239.       - justify-content: end
  240.       - align-self: start
  241.   name:
  242.     - justify-self: start
  243.     - align-self: start
  244.     - font-size: 18px
  245.     - font-weight: 500
  246.     - color: null
  247.   label:
  248.     - min-height: 80px
  249.     - justify-self: start
  250.     - align-self: start
  251.     - font-size: 14px
  252.     - font-weight: 300
  253.     - opacity: '0.7'
  254. state:
  255.   - value: 'off'
  256.     styles:
  257.       img_cell:
  258.         - background: '#FFC47E'
  259.         - opacity: 0.2
  260.   - value: unavailable
  261.     styles:
  262.       img_cell:
  263.         - background: '#FFC47E'
  264.         - opacity: 0.2
  265.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement