Advertisement
314ma

car card

Oct 28th, 2021
1,416
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 2.18 KB | None | 0 0
  1. type: picture-elements
  2. image: /local/images/car.jpg
  3. elements:
  4.   - type: custom:bar-card
  5.     entity: "sensor.car_fuel"
  6.     title_position: 'off'
  7.     icon_position: 'off'
  8.     indicator: 'off'
  9.     show_value: 'false'
  10.     height: 99%
  11.     padding: 0px
  12.     direction: right
  13.     severity:
  14.       - value: 20
  15.         color: 'hsl(0, 75%, 50%)'
  16.       - value: 50
  17.         color: 'hsl(40, 75%, 50%)'
  18.       - value: 100
  19.         color: 'hsl(120, 75%, 50%)'
  20.     style:
  21.       bottom: 5px
  22.       right: 5px
  23.       left: 5px
  24.       transform: "translate(0%, 0%)"
  25.       "--card-background-color": "rgba(39, 40, 43, 0.7)"
  26.   - type: state-label
  27.     entity: sensor.car_odometer
  28.     style:
  29.       top: 10px
  30.       right: 10px
  31.       color: black
  32.       transform: translate(0%, 0%)
  33.       pointer-events: none
  34.       font-size: 200%
  35.       font-weight: bold
  36.       font-family: 'DigitalDisplay'
  37.   - type: state-label
  38.     entity: sensor.car_fuel
  39.     attribute: distanceToEmpty
  40.     prefix: "→"
  41.     suffix: " km"
  42.     style:
  43.       top: 40px
  44.       right: 15px
  45.       color: black
  46.       transform: translate(0%, 0%)
  47.       pointer-events: none
  48.   - type: state-icon
  49.     entity: sensor.state_car
  50.     style:
  51.       pointer-events: none
  52.       top: 18px
  53.       left: 18px
  54.       "--paper-item-icon-color": black
  55.       transform: scale(2) translate(-33%, -33%)
  56.       transform-origin: left top
  57.   - type: state-label
  58.     entity: sensor.car_lastrefresh_localized
  59.     style:
  60.       bottom: 10px
  61.       right: 10px
  62.       color: black
  63.       transform: translate(0%, 0%)
  64.       pointer-events: none
  65.   - type: conditional
  66.     conditions:
  67.       - entity: lock.car_doorlock
  68.         state: locked
  69.     elements:
  70.       - type: icon
  71.         icon: mdi:lock
  72.         style:
  73.           top: 10px
  74.           left: 55px
  75.           color: black
  76.           transform: scale(0.75)
  77.           transform-origin: top left
  78.   - type: conditional
  79.     conditions:
  80.       - entity: lock.car_doorlock
  81.         state: open
  82.     elements:
  83.       - type: icon
  84.         icon: mdi:lock-open
  85.         style:
  86.           top: 10px
  87.           left: 55px
  88.           color: black
  89.           transform: scale(0.75)
  90.           transform-origin: top left
  91.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement