Facebook
From darek, 1 Month ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 167
  1.       - type: custom:stack-in-card
  2.         cards:
  3.           - type: custom:mushroom-template-card
  4.             primary: Salon
  5.             secondary: >-
  6.               {{ states('sensor.czujnik_cgg1_1_temperature') | round(2) }} °C |
  7.               {{ states('sensor.czujnik_cgg1_1_humidity') | round(0) }} %
  8.             icon: mdi:sofa
  9.             tap_action:
  10.               action: navigate
  11.               navigation_path: /config/logs
  12.             icon_color: '#a37208'
  13.             fill_container: true
  14.             layout: horizontal
  15.             badge_icon: |
  16.               {% if is_state('light.tasma_led_rgbww', 'on') %}
  17.                 mdi:led-strip-variant
  18.               {% endif %}
  19.             multiline_secondary: false
  20.             entity: light.tasma_led_rgbww
  21.             card_mod:
  22.               style: |
  23.                 mushroom-badge-icon {
  24.                   {% set r = state_attr('light.tasma_led_rgbww', 'rgb_color')[0] %}
  25.                   {% set g = state_attr('light.tasma_led_rgbww', 'rgb_color')[1] %}
  26.                   {% set b = state_attr('light.tasma_led_rgbww', 'rgb_color')[2] %}
  27.                   {% if is_state('light.tasma_led_rgbww', 'on') %}
  28.                     {% set bri = state_attr('light.tasma_led_rgbww', 'brightness') / 255 %}
  29.                     --main-color: rgba({{r}}, {{g}}, {{b}}, {{bri}}) ;
  30.                   {% endif %}
  31.                 }
  32.                 :host([dark-mode]) {
  33.                   background: rgba(var(--rgb-primary-background-color), 0.2);
  34.                 }
  35.                 :host {
  36.                   background: rgba(var(--rgb-primary-text-color), 0.05);
  37.                   --mush-icon-size: 55px;
  38.                   height: 66px;
  39.                   margin-left: -8px !important;
  40.                   --mush-card-secondary-font-size: 14px;
  41.                   --mush-card-primary-font-size: 15px;
  42.                 }
  43.                 ha-card {
  44.                   --badge-size: 30px;
  45.                 )
  46.           - type: custom:mushroom-chips-card
  47.             chips:
  48.               - type: template
  49.                 entity: media_player.sony_bravia_tv
  50.                 icon_color: |
  51.                   {% if is_state(entity, 'off') %}
  52.                     grey
  53.                   {% elif is_state(entity, 'unavailable') %}
  54.                     black
  55.                   {% else %}
  56.                     green
  57.                   {% endif %}
  58.                 primary: Canal+
  59.                 layout: vertical
  60.                 icon: |
  61.                   {% if is_state(entity, 'off') %}
  62.                     mdi:remote-tv-off
  63.                   {% elif is_state(entity, 'unavailable') %}
  64.                     mdi:remote-tv-off
  65.                   {% else %}
  66.                     mdi:remote-tv
  67.                   {% endif %}
  68.                 tap_action:
  69.                   action: navigate
  70.                   navigation_path: /lovelace-mushroom/remote
  71.               - type: template
  72.                 entity: media_player.sony_bravia_tv
  73.                 icon: |
  74.                   {% if is_state(entity, 'off') %}
  75.                     mdi:television-classic-off
  76.                   {% elif is_state(entity, 'unavailable') %}
  77.                     mdi:television-classic-off
  78.                   {% else %}
  79.                     mdi:television-classic
  80.                   {% endif %}
  81.                 icon_color: |
  82.                   {% if is_state(entity, 'off') %}
  83.                     grey
  84.                   {% elif is_state(entity, 'unavailable') %}
  85.                     black
  86.                   {% else %}
  87.                     indigo
  88.                   {% endif %}
  89.                 tap_action:
  90.                   action: more-info
  91.               - type: template
  92.                 icon: |
  93.                   {% if is_state(entity, 'on') %}
  94.                     mdi:floor-lamp
  95.                   {% else %}
  96.                     mdi:floor-lamp-outline
  97.                   {% endif %}
  98.                 icon_color: |
  99.                   {% if is_state(entity, 'on') %}
  100.                     yellow
  101.                   {% elif is_state(entity, 'off') %}
  102.                     grey
  103.                   {% else %}
  104.                     black
  105.                   {% endif %}
  106.                 entity: light.yeelight_white
  107.                 content_info: none
  108.                 tap_action:
  109.                   action: more-info
  110.               - type: template
  111.                 icon: |
  112.                   {% if is_state(entity, 'on') %}
  113.                     mdi:lightbulb-spot
  114.                   {% else %}
  115.                     mdi:lightbulb-spot-off
  116.                   {% endif %}
  117.                 icon_color: |
  118.                   {% if is_state(entity, 'on') %}
  119.                     yellow
  120.                   {% elif is_state(entity, 'off') %}
  121.                     grey
  122.                   {% else %}
  123.                     black
  124.                   {% endif %}
  125.                 entity: light.kitchen_led
  126.                 content_info: none
  127.                 card_mod: null
  128.                 style: |
  129.                   ha-card {
  130.                       box-shadow: 0px 0px;
  131.                   }
  132.                 tap_action:
  133.                   action: more-info
  134.               - type: template
  135.                 entity: climate.saswell_gtz03
  136.                 icon: |
  137.                   {% if is_state(entity, 'off') %}
  138.                     mdi:radiator-off
  139.                   {% elif is_state(entity, 'auto') %}
  140.                     mdi:radiator
  141.                   {% else %}
  142.                     mdi:radiator
  143.                   {% endif %}
  144.                 icon_color: |
  145.                   {% if is_state(entity, 'off') %}
  146.                     grey
  147.                   {% elif is_state(entity, 'auto') %}
  148.                     orange
  149.                   {% else %}
  150.                     red
  151.                   {% endif %}
  152.               - type: template
  153.                 icon: |
  154.                   {% if is_state(entity, 'on') %}
  155.                     mdi:window-open-variant
  156.                   {% else %}
  157.                     mdi:window-closed-variant
  158.                   {% endif %}
  159.                 icon_color: |
  160.                   {% if is_state(entity, 'on') %}
  161.                     light-green
  162.                   {% else %}
  163.                     grey
  164.                   {% endif %}
  165.                 entity: binary_sensor.tuya_wifi_doorwindow
  166.                 content_info: none
  167.                 card_mod: null
  168.                 style: |
  169.                   ha-card {
  170.                       box-shadow: 0px 0px;
  171.                   }
  172.                 tap_action:
  173.                   action: more-info
  174.             alignment: end
  175.             card_mod:
  176.               style:
  177.                 mushroom-template-chip:nth-child(5)$: |
  178.                   ha-icon {
  179.                     {% if is_state('climate.saswell_gtz03', 'auto') %}
  180.                        animation: clip 1s linear infinite
  181.                     {% elif is_state('climate.saswell_gtz03', 'heat') %}
  182.                        animation: clip 1s linear infinite
  183.                     {% endif %}                
  184.                     }
  185.                   @keyframes clip {
  186.                     0% {
  187.                       clip-path: inset(50% 0 0 0);
  188.                     }
  189.                     100% {
  190.                       clip-path: inset(0 0 0 0);
  191.                     }
  192.                   }
  193.                 .: |
  194.                   ha-card {
  195.                     --chip-box-shadow: none;
  196.                     --chip-background: none;
  197.                     --chip-size: 40px;
  198.                     --chip-height: 40px;
  199.                     --chip-spacing: -8px;
  200.                   }
  201.         card_mod:
  202.           style: |
  203.             ha-card {
  204.               height: 112px;
  205.             }