Last active
February 23, 2021 07:29
-
-
Save esbenr/7366d776bff5f17dae23b644777c9e1a to your computer and use it in GitHub Desktop.
Car picture-element card example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type: picture-elements | |
image: /local/images/touran.png | |
state_filter: | |
"home": brightness(100%) | |
"not_home": brightness(50%) | |
elements: | |
- type: state-label | |
entity: device_tracker.vw_touran | |
icon: mdi:home | |
style: | |
left: 0 | |
bottom: 0 | |
color: transparent | |
line-height: 32px | |
background-color: rgba(0, 0, 0, 0.5) | |
width: 100% | |
transform: initial | |
padding: 0 0 0 7% | |
- type: state-icon | |
entity: device_tracker.vw_touran | |
icon: mdi:home | |
style: | |
top: 88% | |
left: 10% | |
--paper-item-icon-color: white | |
- type: state-label | |
entity: device_tracker.vw_touran | |
style: | |
top: 96% | |
left: 10% | |
color: white | |
font-size: 12px | |
- type: state-icon | |
entity: device_tracker.vw_touran | |
icon: mdi:gas-station | |
style: | |
top: 88% | |
left: 30% | |
--paper-item-icon-color: white | |
- type: state-label | |
entity: device_tracker.vw_touran | |
attribute: fuel_level | |
suffix: " L" | |
style: | |
top: 96% | |
left: 30% | |
color: white | |
font-size: 12px | |
- type: state-icon | |
entity: device_tracker.vw_touran | |
icon: mdi:bottle-tonic-plus | |
style: | |
top: 88% | |
left: 50% | |
--paper-item-icon-color: white | |
- type: state-label | |
entity: device_tracker.vw_touran | |
attribute: adblue_remaining_km | |
suffix: " Km" | |
style: | |
top: 96% | |
left: 50% | |
color: white | |
font-size: 12px | |
- type: state-icon | |
entity: device_tracker.vw_touran | |
icon: mdi:wrench | |
style: | |
top: 88% | |
left: 70% | |
--paper-item-icon-color: white | |
- type: state-label | |
entity: sensor.vw_touran_predicted_service | |
style: | |
top: 96% | |
left: 70% | |
color: white | |
font-size: 12px | |
- type: state-icon | |
entity: sensor.vw_touran_connected | |
style: | |
top: 88% | |
left: 90% | |
--paper-item-icon-color: white | |
- type: state-label | |
entity: sensor.vw_touran_connected | |
style: | |
top: 96% | |
left: 90% | |
color: white | |
font-size: 12px |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using a picture-element card to show my car in HA.

The main card is a picture card with the car.
Then a semitransparent panel element is added in the bottom.
Then the various icons and texts are added as elements.
All sub-elements has a position in percent, so it adapts to different screen sizes.