Advertisement
Guest User

Vehicle Picture Elements Code

a guest
Sep 21st, 2022
3,767
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 5.18 KB | Source Code | 0 0
  1. type: picture-elements
  2. elements:
  3.   - type: conditional
  4.     conditions:
  5.       - entity: binary_sensor.cx_9_hood
  6.         state: 'on'
  7.     elements:
  8.       - type: image
  9.         entity: binary_sensor.cx_9_hood
  10.         image: /local/img/cx9-top.png
  11.         style:
  12.           top: 50%
  13.           left: 50%
  14.           width: 100%
  15.         filter: saturate(1)
  16.         tap_action: none
  17.       - type: image
  18.         entity: binary_sensor.cx_9_hood
  19.         image: /local/img/cx9-hood.svg
  20.         style:
  21.           top: 50%
  22.           left: 50%
  23.           width: 100%
  24.         filter: saturate(1)
  25.         tap_action: none
  26.   - type: conditional
  27.     conditions:
  28.       - entity: binary_sensor.cx_9_driver_door
  29.         state: 'on'
  30.     elements:
  31.       - type: image
  32.         image: /local/img/cx9-left.png
  33.         style:
  34.           top: 50%
  35.           left: 50%
  36.           width: 100%
  37.         filter: saturate(1)
  38.         tap_action: none
  39.       - type: image
  40.         image: /local/img/cx9-driver-door.svg
  41.         style:
  42.           top: 50%
  43.           left: 50%
  44.           width: 100%
  45.         filter: saturate(1)
  46.         tap_action: none
  47.   - type: conditional
  48.     conditions:
  49.       - entity: binary_sensor.cx_9_passenger_door
  50.         state: 'on'
  51.     elements:
  52.       - type: image
  53.         image: /local/img/cx9-right.png
  54.         style:
  55.           top: 50%
  56.           left: 50%
  57.           width: 100%
  58.         filter: saturate(1)
  59.         tap_action: none
  60.       - type: image
  61.         entity: binary_sensor.cx_9_passenger_door
  62.         image: /local/img/cx9-passenger-door.svg
  63.         style:
  64.           top: 50%
  65.           left: 50%
  66.           width: 100%
  67.         filter: saturate(1)
  68.         tap_action: none
  69.   - type: conditional
  70.     conditions:
  71.       - entity: binary_sensor.cx_9_rear_left_door
  72.         state: 'on'
  73.     elements:
  74.       - type: image
  75.         image: /local/img/cx9-left.png
  76.         style:
  77.           top: 50%
  78.           left: 50%
  79.           width: 100%
  80.         filter: saturate(1)
  81.         tap_action: none
  82.       - type: image
  83.         entity: binary_sensor.cx_9_rear_left_door
  84.         image: /local/img/cx9-rear-left-door.svg
  85.         style:
  86.           top: 50%
  87.           left: 50%
  88.           width: 100%
  89.         filter: saturate(1)
  90.         tap_action: none
  91.   - type: conditional
  92.     conditions:
  93.       - entity: binary_sensor.cx_9_rear_right_door
  94.         state: 'on'
  95.     elements:
  96.       - type: image
  97.         image: /local/img/cx9-right.png
  98.         style:
  99.           top: 50%
  100.           left: 50%
  101.           width: 100%
  102.         filter: saturate(1)
  103.         tap_action: none
  104.       - type: image
  105.         entity: binary_sensor.cx_9_rear_right_door
  106.         image: /local/img/cx9-rear-right-door.svg
  107.         style:
  108.           top: 50%
  109.           left: 50%
  110.           width: 100%
  111.         filter: saturate(1)
  112.         tap_action: none
  113.   - type: conditional
  114.     conditions:
  115.       - entity: binary_sensor.cx_9_trunk
  116.         state: 'on'
  117.     elements:
  118.       - type: image
  119.         image: /local/img/cx9-bottom.png
  120.         style:
  121.           top: 50%
  122.           left: 50%
  123.           width: 100%
  124.         filter: saturate(1)
  125.         tap_action: none
  126.       - type: image
  127.         entity: binary_sensor.cx_9_trunk
  128.         image: /local/img/cx9-trunk.svg
  129.         style:
  130.           top: 50%
  131.           left: 50%
  132.           width: 100%
  133.         filter: saturate(1)
  134.         tap_action: none
  135.   - type: conditional
  136.     conditions:
  137.       - entity: lock.cx_9_lock
  138.         state: unlocked
  139.       - entity: binary_sensor.cx_9_driver_door
  140.         state: 'off'
  141.       - entity: binary_sensor.cx_9_passenger_door
  142.         state: 'off'
  143.       - entity: binary_sensor.cx_9_rear_left_door
  144.         state: 'off'
  145.       - entity: binary_sensor.cx_9_rear_right_door
  146.         state: 'off'
  147.       - entity: binary_sensor.cx_9_hood
  148.         state: 'off'
  149.       - entity: binary_sensor.cx_9_trunk
  150.         state: 'off'
  151.     elements:
  152.       - type: image
  153.         image: /local/img/cx9-all.png
  154.         style:
  155.           top: 50%
  156.           left: 50%
  157.           width: 100%
  158.         filter: saturate(1)
  159.         tap_action: none
  160.       - type: image
  161.         image: /local/img/cx9-lock.svg
  162.         style:
  163.           top: 50%
  164.           left: 50%
  165.           width: 100%
  166.         filter: saturate(1)
  167.         tap_action: none
  168.   - type: state-icon
  169.     entity: lock.cx_9_lock
  170.     state_color: false
  171.     style:
  172.       top: 18%
  173.       left: 25%
  174.   - type: state-label
  175.     entity: lock.cx_9_lock
  176.     style:
  177.       top: 23.5%
  178.       left: 25%
  179.   - type: state-icon
  180.     entity: device_tracker.cx_9_device_tracker
  181.     state_color: false
  182.     style:
  183.       top: 18%
  184.       left: 77%
  185.   - type: state-label
  186.     entity: device_tracker.cx_9_device_tracker
  187.     style:
  188.       top: 23.5%
  189.       left: 77%
  190.   - type: state-icon
  191.     entity: sensor.cx_9_odometer
  192.     style:
  193.       top: 75%
  194.       left: 77%
  195.   - type: state-label
  196.     entity: sensor.cx_9_odometer
  197.     style:
  198.       top: 81%
  199.       left: 77%
  200.   - type: state-icon
  201.     entity: sensor.cx_9_fuel_remaining_percentage
  202.     style:
  203.       top: 75%
  204.       left: 25%
  205.   - type: state-label
  206.     entity: sensor.cx_9_fuel_remaining_percentage
  207.     style:
  208.       top: 81%
  209.       left: 25%
  210. image: /local/img/cx9.svg
  211.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement