Advertisement
pqpxoxa

HA | Office Control Panel Element

Dec 2nd, 2023
711
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 4.83 KB | Software | 0 0
  1. type: custom:button-card
  2. name: Ceiling
  3. entity: light.office_desk_lamp
  4. icon: mdi:monitor-speaker
  5. show_icon: true
  6. tap_action:
  7.   action: none
  8. aspect_ratio: 1/1
  9. styles:
  10.   card:
  11.     - background-color: '#2e3a51'
  12.     - border-radius: 20px
  13.     - padding: 8px
  14.     - box-shadow: >-
  15.         rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px
  16.         60px -30px, rgba(10, 37, 64, 0.35) 0px -2px 6px 0px inset;
  17.   name:
  18.     - font-weight: bold
  19.     - font-size: 28px
  20.     - align-self: middle
  21.     - justify-self: start
  22.     - padding-left: 9px
  23.     - padding-bottom: 1px
  24.     - letter-spacing: '-1.0px'
  25.   icon:
  26.     - padding: 22px
  27.     - width: 70px
  28.     - height: 70px
  29.     - color: white
  30.     - border-radius: 55px
  31.     - background-color: '#4B5975'
  32.     - opacity: 0
  33.   img_cell:
  34.     - justify-content: start
  35.     - align-self: middle
  36.     - margin: none
  37.   grid:
  38.     - grid-template-areas: '"n i1" "i i2" "i i3"'
  39.     - grid-template-columns: 72% 28%
  40.     - grid-template-rows: 1fr 1fr 1fr
  41.   custom_fields:
  42.     sub:
  43.       - position: absolute
  44.       - left: 9%
  45.       - top: 23%
  46.     logo:
  47.       - position: absolute
  48.       - left: '-12%'
  49.       - top: 33%
  50. custom_fields:
  51.   sub:
  52.     card:
  53.       type: custom:button-card
  54.       name: false
  55.       styles:
  56.         card:
  57.           - background-color: transparent
  58.           - border-style: none
  59.         name:
  60.           - justify-self: left
  61.           - font-size: 12px
  62.           - font-weight: 400
  63.           - font-color: transparent
  64.   logo:
  65.     card:
  66.       type: custom:button-card
  67.       color: transparent
  68.       show_name: false
  69.       name: false
  70.       entity_picture: >-
  71.         https://abc,,,.ui.nabu.casa/local/officeceiling.png
  72.       show_entity_picture: true
  73.       styles:
  74.         card:
  75.           - background-color: transparent
  76.           - border-style: none
  77.         icon:
  78.           - width: 110px
  79.           - height: 110px
  80.           - color: white
  81.           - padding: 28px
  82.           - align-self: start
  83.           - text-align: start
  84.           - background-color: '#4B5975'
  85.           - border-radius: 95px
  86.   i1:
  87.     card:
  88.       type: custom:button-card
  89.       color: transparent
  90.       show_name: false
  91.       name: Power
  92.       icon: mdi:power
  93.       tap_action:
  94.         action: call-service
  95.         service: light.toggle
  96.         data: {}
  97.         target:
  98.           entity_id:
  99.            - light.office_ceiling
  100.       styles:
  101.         card:
  102.           - background-color: '#4B5975'
  103.           - border-radius: 55px
  104.           - border-style: none
  105.           - box-shadow: >-
  106.               rgba(0, 0, 0, 0.4) 0px 2px 4px, rgba(0, 0, 0, 0.3) 0px 7px 13px
  107.               -3px, rgba(0, 0, 0, 0.2) 0px -3px 0px inset
  108.         icon:
  109.           - width: 30px
  110.           - height: 30px
  111.           - color: white
  112.           - align-self: start
  113.           - text-align: start
  114.           - padding: 12px
  115.         img_cell:
  116.           - justify-content: middle
  117.           - align-self: middle
  118.           - margin: none
  119.   i2:
  120.     card:
  121.       type: custom:button-card
  122.       color: transparent
  123.       show_name: false
  124.       name: Power
  125.       icon: mdi:lightbulb-on
  126.       tap_action:
  127.         action: call-service
  128.         service: light.turn_on
  129.         data:
  130.           brightness_pct: 100
  131.         target:
  132.           entity_id:
  133.            - light.office_ceiling
  134.       styles:
  135.         card:
  136.           - background-color: '#4B5975'
  137.           - border-radius: 55px
  138.           - border-style: none
  139.           - box-shadow: >-
  140.               rgba(0, 0, 0, 0.4) 0px 2px 4px, rgba(0, 0, 0, 0.3) 0px 7px 13px
  141.               -3px, rgba(0, 0, 0, 0.2) 0px -3px 0px inset
  142.         icon:
  143.           - width: 28px
  144.           - height: 28px
  145.           - color: white
  146.           - align-self: start
  147.           - text-align: start
  148.           - padding: 13px
  149.         img_cell:
  150.           - justify-content: middle
  151.           - align-self: middle
  152.           - margin: none
  153.   i3:
  154.     card:
  155.       type: custom:button-card
  156.       color: transparent
  157.       show_name: false
  158.       name: Power
  159.       icon: mdi:lightbulb-on-40
  160.       tap_action:
  161.         action: call-service
  162.         service: light.turn_on
  163.         data:
  164.           brightness_pct: 10
  165.         target:
  166.           entity_id:
  167.            - light.office_ceiling
  168.       styles:
  169.         card:
  170.           - background-color: '#4B5975'
  171.           - border-radius: 55px
  172.           - border-style: none
  173.           - box-shadow: >-
  174.               rgba(0, 0, 0, 0.4) 0px 2px 4px, rgba(0, 0, 0, 0.3) 0px 7px 13px
  175.               -3px, rgba(0, 0, 0, 0.2) 0px -3px 0px inset
  176.         icon:
  177.           - width: 28px
  178.           - height: 28px
  179.           - color: white
  180.           - align-self: start
  181.           - text-align: start
  182.           - padding: 13px
  183.         img_cell:
  184.           - justify-content: middle
  185.           - align-self: middle
  186.           - margin: none
  187.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement