Advertisement
fablav

light_button_accese

Sep 16th, 2024
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 2.25 KB | Software | 0 0
  1. button_card_templates:
  2.   light_button_accese:
  3.     variables:
  4.       background: rgba(255, 191, 0, 0.22)
  5.       icon_color: rgba(255, 191, 0, 0.8)
  6.     show_icon: true
  7.     show_name: false
  8.     show_state: false
  9.     show_label: true
  10.     tap_action:
  11.       action: toggle
  12.     hold_action:
  13.       action: more-info
  14.     custom_fields:
  15.       btn:
  16.         card:
  17.           type: custom:button-card
  18.           entity: '[[[ return entity.entity_id ]]]'
  19.           entity_picture: /local/ic/info_yellow.png
  20.           show_icon: false
  21.           show_name: false
  22.           show_entity_picture: true
  23.           tap_action:
  24.             action: more-info
  25.           styles:
  26.             img_cell:
  27.               - margin-top: px
  28.               - margin-bottom: px
  29.             entity_picture:
  30.               - width: 25px
  31.             card:
  32.               - background-color: transparent
  33.     state:
  34.       - value: 'on'
  35.         styles:
  36.           icon:
  37.             - animation: scan 4s ease-in-out infinite
  38.             - color: '[[[ return variables.icon_color ]]]'
  39.           label:
  40.             - color: var(--contrast18)
  41.           card:
  42.             - '-webkit-box-shadow': 0 0 5px 1px rgba(255, 191, 0, 0.8)
  43.             - box-shadow: 0 0 5px 1px rgba(255, 191, 0, 1)
  44.             - transition: all 2s ease
  45.             - background: '[[[ return variables.background ]]]'
  46.     extra_styles: |
  47.      @keyframes scan {
  48.         0%, 100% { transform: rotate(20deg); }
  49.         50% { transform: rotate(-15deg); }      
  50.       }
  51.     styles:
  52.       grid:
  53.         - grid-template-areas: '"i btn" "l l"'
  54.         - grid-template-columns: 1fr 1fr
  55.         - grid-template-rows: 1fr
  56.       label:
  57.         - justify-self: start
  58.         - font-size: 10px
  59.         - margin-top: '-10px'
  60.         - margin-bottom: 10px
  61.       icon:
  62.         - width: 25px
  63.       img_cell:
  64.         - justify-self: start
  65.         - width: 30px
  66.         - height: 30px
  67.       card:
  68.         - height: 65px
  69.         - padding: 0 20px 0 20px
  70.         - border-radius: 15px
  71.         - box-shadow: 0px 2px 4px 0px rgba(0,0,0,0.36)
  72.         - '--mdc-ripple-color': rgb(255, 191, 0)
  73.         - '--mdc-ripple-press-opacity': 0.5
  74.       custom_fields:
  75.         btn:
  76.           - justify-self: end
  77.           - margin-bottom: 10px
Tags: ha
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement