Advertisement
-Miura-

Untitled

Aug 9th, 2024
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.25 KB | None | 0 0
  1. type: custom:stack-in-card
  2. cards:
  3.   - type: custom:button-card
  4.     show_label: false
  5.     show_state: true
  6.     state_display: Goedemorgen Bruno
  7.     styles:
  8.       card:
  9.         - height: 40px
  10.         - padding: 0px
  11.         - background: none
  12.         - box-shadow: none
  13.       state:
  14.         - font-size: 25px
  15.         - font-weight: 1000
  16.   - type: custom:button-card
  17.     show_label: false
  18.     show_state: true
  19.     state_display: |
  20.      [[[
  21.         const date = new Date();
  22.         const hour = date.getHours();
  23.         const min = date.getMinutes();
  24.         return hour + ':' + min
  25.       ]]]
  26.     styles:
  27.       card:
  28.         - height: 30px
  29.         - padding: 0px
  30.         - margin-top: '-16px'
  31.         - margin-bottom: '-16px'
  32.         - background: none
  33.         - box-shadow: none
  34.   - type: custom:button-card
  35.     show_label: false
  36.     show_state: true
  37.     state_display: |
  38.      [[[
  39.         const options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' };
  40.         const date  = new Date();
  41.         return date.toLocaleDateString("nl-NL", options);
  42.       ]]]
  43.     styles:
  44.       card:
  45.         - height: 30px
  46.         - padding: 0px
  47.         - margin-bottom: '0px'
  48.         - background: none
  49.         - box-shadow: none
  50.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement