Currently working on a EV charging/vehicle dashboard and i’m a bit stuck trying to create a visual that shows the amount of charge the car has remaining. Ideally I would like it similar to that of the native car app as it looks clean and does a good job of showing how much charge is left at a glance.
In a nutshell, the native app has a transparent image of the vehicle, then for each percentage of charge, it shades the car in with green. So for 10% charge left, 10 percent of the vehicle will be shaded in.
I’ve got a suitable image which i’ve added into a picture elements card but what would be the best approach to deal with the shading? I know I can apply hue rotation to the image but that makes the car all the same colour?
Initially I was thinking of adding a tinted background as an element then dynamically moving the width as a percentage in-line with the car charging percentage obtained from the vehicle sensor. However I cant get it to just shade in the car and not the whole card.
I’ve attached a photo of the car app to give a better understanding of what i’m trying to achieve.
The first image should be the car image you want to use. The second is the same car image duplicated but this time saved as a different colour. The 3rd image is what you want the vehicle to sit in front of. For me, I’ve just made an image that’s transparent.
Thanks for that. I got it to work and really like the idea and going to see what else I can do with my cars integration. Would be interested to see what other ideas you had when doing your vehicle dashboard.
@autostreak@Ildar_Gabdullin Getting somewhere with it, but would love to know how I can make the 2 status badges the same size and also get rid of the annoying grey band down the right hand side of mine. I think it is something to do with image sizes but appreciate if you can give me any more tips.
seems not to be too much movement on this thread, but it is exactly what I’m looking for to it is worth it to try. Hope someone can help.
First, I’m not very familiar with CSS nor code developing, so my only chance is to copy and reverse engineer the code, trying to undertand to adapt myself. Unfortunatelly, didn’t work so here I am asking for help
I have implemented the same for my car:
(on the tablet, it looks better)
I also want to add the remaining charging time but ONLY visible, when remaining charging time > 0 (which means, that the car is plugged in and charging).
Any possibility to have this condition in the picture elements card?