Advertisement
dykandDK

HA - YAML - Lovelace Tablet Header

Jan 23rd, 2021
285
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 8.03 KB | None | 0 0
  1. #───────────────────────────────────────────────────────────────────────────────
  2. # Description:
  3. #───────────────────────────────────────────────────────────────────────────────
  4. # Tablet header with in current date, time, sunset/sunrise and home/away
  5. # information as well as navigation icons.
  6. #
  7. #───────────────────────────────────────────────────────────────────────────────
  8. # Custom components required:
  9. #───────────────────────────────────────────────────────────────────────────────
  10. # None
  11.  
  12. type: picture-elements
  13. state_filter:
  14.  - null
  15. image: /local/assets/blank.png
  16. aspect_ratio: 5%
  17. elements:
  18.  #─────────────────────────────────────────────────────────────────────────────
  19.   ### TIME ###
  20.   #─────────────────────────────────────────────────────────────────────────────
  21.   - type: state-label
  22.     entity: sensor.local_time
  23.     style:
  24.       top: 50%
  25.       left: 20px
  26.       #height: 100px
  27.       width: 200px
  28.       text-align: right
  29.       font-size: 2.8em
  30.       color: rgba(202,217,235,1)
  31.     tap_action:
  32.       action: navigate
  33.       navigation_path: "/ugeplan-yaml"
  34.   #─────────────────────────────────────────────────────────────────────────────
  35.   ### WEEKDAY ###
  36.   #─────────────────────────────────────────────────────────────────────────────
  37.   - type: state-label
  38.     entity: sensor.local_weekday
  39.     style:
  40.       top: 34%
  41.       left: 150px
  42.       width: 50px
  43.       text-align: left
  44.       font-size: 0.8em
  45.       text-transform: uppercase
  46.       color: rgba(202,217,235,.75)
  47.   #─────────────────────────────────────────────────────────────────────────────
  48.   ### DATE ###
  49.   #─────────────────────────────────────────────────────────────────────────────
  50.   - type: state-label
  51.     entity: sensor.local_date3
  52.     style:
  53.       top: 64%
  54.       left: 150px
  55.       width: 50px
  56.       text-align: left
  57.       font-size: 1.3em
  58.       text-transform: uppercase
  59.       color: rgba(202,217,235,.75)
  60.   #─────────────────────────────────────────────────────────────────────────────
  61.   ### SUNRISE ###
  62.   #─────────────────────────────────────────────────────────────────────────────
  63.   - type: icon
  64.     icon: mdi:weather-sunset-up
  65.     style:
  66.       top: 40%
  67.       left: 28%
  68.       color: rgba(202,217,235,1)
  69.   - type: state-label
  70.     entity: sensor.local_sunrise
  71.     style:
  72.       top: 40%
  73.       left: 31.2%
  74.       color: rgba(202,217,235,1)
  75.   #─────────────────────────────────────────────────────────────────────────────
  76.   ### SUNSET ###
  77.   #─────────────────────────────────────────────────────────────────────────────
  78.   - type: icon
  79.     icon: mdi:weather-sunset-down
  80.     style:
  81.       top: 75%
  82.       left: 28%
  83.       color: rgba(202,217,235,1)
  84.   - type: state-label
  85.     entity: sensor.local_sunset
  86.     style:
  87.       top: 75%
  88.       left: 31.2%
  89.       color: rgba(202,217,235,1)
  90.   #─────────────────────────────────────────────────────────────────────────────
  91.   ### Home/Away status ###
  92.   #─────────────────────────────────────────────────────────────────────────────
  93.   - type: image
  94.     entity: person.anders
  95.     image: /local/assets/dykand.png
  96.     state_image:
  97.       "not_home": /local/assets/dykand_away.png
  98.       "home": /local/assets/dykand.png
  99.     show_name: false
  100.     style:
  101.       top: 50%
  102.       left: 44%
  103.       height: 54px
  104.       width: 54px
  105.       border-radius: 27px
  106.   - type: image
  107.     entity: person.line
  108.     image: /local/assets/line.png
  109.     show_name: false
  110.     state_image:
  111.       "not_home": /local/assets/line_away.png
  112.       "home": /local/assets/line.png
  113.     style:
  114.       top: 50%
  115.       left: 50%
  116.       height: 54px
  117.       width: 54px
  118.       border-radius: 27px
  119.   - type: image
  120.     entity: device_tracker.passat_bt
  121.     image: /local/assets/line.png
  122.     show_name: false
  123.     state_image:
  124.       "not_home": /local/assets/vw_logo.jpg
  125.       "home": /local/assets/vw_logo.jpg
  126.     tap_action:
  127.       action: navigate
  128.       navigation_path: "/tablet-yaml/1"
  129.     style:
  130.       top: 50%
  131.       left: 56%
  132.       height: 54px
  133.       width: 54px
  134.       border-radius: 27px
  135.   #─────────────────────────────────────────────────────────────────────────────
  136.   ### ICONS ###
  137.   #─────────────────────────────────────────────────────────────────────────────
  138.   - type: state-icon
  139.     entity: sensor.local_date
  140.     icon: mdi:home
  141.     style:
  142.       top: 40%
  143.       left: 78%
  144.       color: var(--primary-foreground-color)
  145.       --iron-icon-height: 50px
  146.       --mdc-icon-size: 50px
  147.     tap_action:
  148.       action: navigate
  149.       navigation_path: "/tablet-yaml/0"
  150.   - type: state-icon
  151.     entity: vacuum.xiaomi_vacuum_cleaner
  152.     icon: hass:robot-vacuum #mdi:robot-vacuum
  153.     style:
  154.       top: 40%
  155.       left: 84%
  156.       color: var(--primary-foreground-color)
  157.       --mdc-icon-size: 50px
  158.     tap_action:
  159.       action: navigate
  160.       navigation_path: "/tablet-yaml/2"
  161.   - type: state-icon
  162.     entity: sensor.local_date
  163.     icon: mdi:lightbulb
  164.     style:
  165.       top: 40%
  166.       left: 90%
  167.       color: var(--primary-foreground-color)
  168.       --mdc-icon-size: 50px
  169.     tap_action:
  170.       action: navigate
  171.       navigation_path: "/tablet-yaml/3"
  172.   - type: state-icon
  173.     entity: sensor.local_date
  174.     icon: mdi:music
  175.     style:
  176.       top: 40%
  177.       left: 96%
  178.       color: var(--primary-foreground-color)
  179.       --mdc-icon-size: 50px
  180.     tap_action:
  181.       action: navigate
  182.       navigation_path: "/tablet-yaml/4"
  183.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement