SOLVED - Add Picture icon to map (car icon)

Hello,

on the map, I would like to put a picture of the people or of my car to show on the map.
Do you know :slight_smile:

  1. How do I upload the pictures
  2. How do I set this picture as the “device” on the map ?

I had a look at my devices, but found nowhere where to assign a “picture”. On the map for the moment it shows circles with the acronyms of the device.

Many thanks !

Map card (or Map view) shows entities with “latitude” & “longitude” attributes.
Usually images are set to “person” & “device_tracker” entities via customization.
For “person” entities it may be done in UI for “people”.
For “device_tracker” - only via yaml customization (somewhere here described).

Thanks a lot … this is to show the picture of my car on the map, instead of a circle with letters in it.
I have successfully put the picture in the www folder. it is accessible via /local/bmw-picture.png

I am wondering where I need to “map” this picture with the entity, now …

On the entity config itself, I can not assign it :

on the map itself, I can only see this :

… as you can see, it is only 4 lines … I think I need to put the link to the picture there somewhere ?
the link you mention is not helping lee that much

only this variant.

ok - I found out how to show my car’s picture on the Map card.
First, upload the picture (in png format from my side) in the HA, I did it using the “File editor” add-on I have installed. Using this, put the picture under “www”, so that is is accessible from “/local/”.

Then, edit the configuration.yaml adding this code :

homeassistant: 
  customize: !include customize.yaml

… This is to call a “customize.yaml” config file. As it was not existing yet, I have created it at the same level of “configuration.yaml” like this :

then edit this customization.yaml and I have put the following code to assign the picture to the tracker tracker of my car :

device_tracker.225e_xdrive:
  entity_picture: /local/BMW-picture.png

… and magic, the icon is now showing on the map :

Hope it can help !

5 Likes

What are the purple lines? Do you keep track of the location history in this map card?

yes, indeed

I just wanted to let you know I finally got the time to follow your guide, and it works perfectly. Thanks for the support! next step is to enter the tracking lines on the map…

I step in for one final question, is there a trick to center the picture? I tried to put the car logo in and I could never manage to center it

What do you lean center a picture ?
the picture which is showed on the map will be the pone you have put in your config, centered in a circle …

image
that I mean

It´s not in the middle/centered and I don´t know how to adjust. I changed the resolution and tried a few things but no success

I guess you need to play a bit with the original picture, try to center it, see what part of the picture HA takes to put in the circle … see here is my original picture :

… and here is what I see on the map :

image

It looks like it take the left part of the original picture :wink:
Maybe if you make the original picture the correct size directly, it will be better (I see in some topics they talk about a picture of 192x192 pixels) …

… but I am happy with it
:wink: