Advertisement
GergoIO

Living Room Lovelace Card

Sep 22nd, 2020
1,242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 2.24 KB | None | 0 0
  1. - type: custom:button-card
  2.   icon: mdi:sofa
  3.   aspect_ratio: 1/1
  4.   show_name: false
  5.   size: 80%
  6.   styles:
  7.     grid:
  8.       - grid-template-areas: '"i i r1" "i i r2" "b1 b2 br"' #Set up the areas of the card (first 2 columns of the top 2 rows are the icon then 2 icons on the right, and 3 along the bottom.
  9.       - grid-template-rows: 1fr 1fr 1fr
  10.       - grid-template-columns: 1fr 1fr 1fr
  11.     card:
  12.       - max-width: 180px
  13.       - max-height: 180px
  14.       - padding-bottom: 0
  15.       - padding-top: 0
  16.   custom_fields:
  17.     r1: #Icon at the top on the right
  18.       card:
  19.         type: custom:button-card
  20.         show_name: false
  21.         size: 100%
  22.         style: |
  23.          ha-card {
  24.             box-shadow: none;
  25.           }
  26.         entity: input_select.p1_location
  27.         icon: mdi:face
  28.         state:
  29.           - value: "Living Room" #Only show icon if P1 is in the Living Room
  30.             color: "var(--accent-color)"
  31.           - operator: default
  32.             color: "rgba(0, 0, 0, 0)"
  33.     r2: #Icon in the middle on the right
  34.       card:
  35.         type: custom:button-card
  36.         show_name: false
  37.         size: 100%
  38.         style: |
  39.          ha-card {
  40.             box-shadow: none;
  41.           }
  42.         entity: input_select.p2_location
  43.         icon: mdi:face-woman
  44.         state:
  45.           - value: "Living Room"
  46.             color: "var(--accent-color)"
  47.           - operator: default
  48.             color: "rgba(0, 0, 0, 0)"
  49.     b1: #Icon on the bottom left
  50.       card:
  51.         type: custom:button-card
  52.         show_name: false
  53.         size: 100%
  54.         style: |
  55.          ha-card {
  56.             box-shadow: none;
  57.           }
  58.         entity: input_boolean.living_room_string_lights
  59.         icon: mdi:string-lights
  60.     b2: #Icon on the bottom middle
  61.       card:
  62.         type: custom:button-card
  63.         show_name: false
  64.         size: 100%
  65.         style: |
  66.          ha-card {
  67.             box-shadow: none;
  68.           }
  69.         color_type: blank-card
  70.     br: #Bottom right icon
  71.       card:
  72.         type: custom:button-card
  73.         show_name: false
  74.         size: 100%
  75.         style: |
  76.          ha-card {
  77.             box-shadow: none;
  78.           }
  79.         entity: binary_sensor.living_room_motion
  80.         icon: mdi:walk
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement