Advertisement
fredrik_persson_

Echo Show v1

Feb 1st, 2024 (edited)
1,321
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 5.31 KB | None | 0 0
  1. type: custom:button-card
  2. entity: input_boolean.dummy_light1
  3. tap_action:
  4.   action: toggle
  5. show_name: false
  6. styles:
  7.   grid:
  8.     - grid-template-areas: '"weather alarm" "clock clock" "date date"'
  9.     - grid-template-rows: min-content 1fr min-content
  10.     - grid-template-columns: 1fr 1fr
  11.     - row-gap: .5rem
  12.   card:
  13.     - height: 100%
  14.     - padding: 2rem 2rem 3rem 2rem
  15.     - background: center / cover no-repeat url(/local/images/album-art.jpg)
  16.     - overflow: hidden
  17.   custom_fields:
  18.     filter1:
  19.       - position: absolute
  20.       - height: 150%
  21.       - width: 150%
  22.       - backdrop-filter: brightness(50%)
  23.       - overflow: hidden
  24.       - z-index: 1
  25.     filter2:
  26.       - position: absolute
  27.       - height: 150%
  28.       - width: 150%
  29.       - backdrop-filter: brightness(100%)
  30.       - overflow: hidden
  31.       - z-index: 3
  32.     weather:
  33.       - justify-self: start
  34.       - z-index: 2
  35.     alarm:
  36.       - justify-self: end
  37.       - z-index: 2
  38.     clock:
  39.       - color: white
  40.       - justify-self: center
  41.       - font-size: 10rem
  42.       - z-index: 2
  43.     date:
  44.       - justify-self: center
  45.       - align-self: center
  46.       - z-index: 2
  47.     assistant:
  48.       - position: absolute
  49.       - justify-self: center
  50.       - z-index: 4
  51.       - bottom: 5%
  52. state:
  53.   - value: 'on'
  54.     styles:
  55.       custom_fields:
  56.         filter2:
  57.           - animation: brightness .5s ease-in-out forwards
  58.         assistant:
  59.           - animation: big .5s ease-in-out forwards
  60. extra_styles: |
  61.   @keyframes big {
  62.     100% {
  63.       bottom: 50%;
  64.     }
  65.   }
  66.   @keyframes brightness {
  67.     100% {
  68.       backdrop-filter: brightness(50%);
  69.     }
  70.   }
  71. custom_fields:
  72.   filter1: .
  73.   weather:
  74.     card:
  75.       type: custom:button-card
  76.       show_name: true
  77.       show_icon: true
  78.       icon: fas:sun
  79.       name: |
  80.         [[[
  81.           return states["weather.home"].attributes.temperature + ' °C'
  82.         ]]]
  83.       styles:
  84.         grid:
  85.           - grid-template-areas: '"i n"'
  86.           - grid-template-columns: 1fr min-content
  87.           - column-gap: .5rem
  88.         card:
  89.           - height: 100%
  90.           - padding: 0
  91.           - background: none
  92.         name:
  93.           - color: white
  94.           - justify-self: center
  95.           - align-self: center
  96.           - font-size: 1.25rem
  97.           - font-weight: 600
  98.         img_cell:
  99.           - justify-self: start
  100.           - align-self: center
  101.           - width: 1.25rem
  102.           - height: 1.25rem
  103.         icon:
  104.           - width: 100%
  105.           - color: white
  106.   alarm:
  107.     card:
  108.       type: custom:button-card
  109.       show_name: true
  110.       show_icon: true
  111.       icon: fas:clock
  112.       name: 6:00 AM
  113.       styles:
  114.         grid:
  115.           - grid-template-areas: '"i n"'
  116.           - grid-template-columns: 1fr min-content
  117.           - column-gap: .5rem
  118.         card:
  119.           - height: 100%
  120.           - padding: 0
  121.           - background: none
  122.         name:
  123.           - color: white
  124.           - justify-self: center
  125.           - align-self: center
  126.           - font-size: 1.25rem
  127.           - font-weight: 600
  128.         img_cell:
  129.           - justify-self: start
  130.           - align-self: center
  131.           - width: 1.25rem
  132.           - height: 1.25rem
  133.         icon:
  134.           - width: 100%
  135.           - color: white
  136.   clock:
  137.     card:
  138.       type: custom:button-card
  139.       show_name: true
  140.       name: '[[[ return states["sensor.time"].state ]]]'
  141.       styles:
  142.         card:
  143.           - height: 100%
  144.           - padding: 1rem 0
  145.           - background: none
  146.         name:
  147.           - color: white
  148.           - justify-self: center
  149.           - align-self: center
  150.           - font-size: 5vmax
  151.           - font-weight: 600
  152.   date:
  153.     card:
  154.       type: custom:button-card
  155.       show_name: true
  156.       name: |
  157.         [[[
  158.           const options = { weekday: "short", month: "short", day: "numeric", };
  159.           return new Date().toLocaleDateString([], options)
  160.         ]]]  
  161.       styles:
  162.         card:
  163.           - padding: 0
  164.           - background: none
  165.         name:
  166.           - color: white
  167.           - justify-self: center
  168.           - align-self: center
  169.           - font-size: 1.25rem
  170.           - font-weight: 600
  171.   filter2: .
  172.   assistant:
  173.     card:
  174.       type: custom:button-card
  175.       entity: input_boolean.dummy_light1
  176.       name: What can I do for you?
  177.       show_icon: false
  178.       tap_action:
  179.         action: none
  180.       styles:
  181.         card:
  182.           - height: .25rem
  183.           - width: 4rem
  184.           - border-radius: 500px
  185.           - padding: 0
  186.           - background: white
  187.           - transform: translate(0%, 50%)
  188.         name:
  189.           - opacity: 0
  190.       state:
  191.         - value: 'on'
  192.           styles:
  193.             card:
  194.               - animation: big2 .5s ease-in-out forwards
  195.               - animation-delay: .75s
  196.             name:
  197.               - animation: big3 .75s ease-in-out forwards
  198.               - animation-delay: 1s
  199.       extra_styles: |
  200.         @keyframes big2 {
  201.           0%{
  202.             height: .25rem;
  203.             width: 4rem;
  204.  
  205.           }
  206.           100% {
  207.             height: 3.25rem;
  208.             width: 16rem;
  209.             transform: translate(0%, 50%);
  210.           }
  211.         }
  212.         @keyframes big3 {
  213.           0%{
  214.             opacity: 0;
  215.           }
  216.           100% {
  217.             opacity: 1;
  218.           }
  219.         }
  220.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement