How do I add an image to the person component

I’m using the person component for presence detection for me and my wife. I can’t find out how to add an image to each tracking entity. I’d like to add a profile picture for each of us. Anyone know how to do this?

In lovelace, you can specify an image for an entity. E.g.: https://www.home-assistant.io/lovelace/picture-entity/

1 Like

I dont think that works in this instance?
or it hasn’t for me in the following list:

^ top is a device with image assigned via known_devices.yaml, bottom is a person with that device assigned to it.

I’m assuming this would be something planned to be added to the person config in integrations in a future version?

It works for me, although I’m using state images:

- type: picture-glance
  entity: person.david
  entities:
    - entity: device_tracker.smartphone_david_wifi
      icon: mdi:cellphone-wireless
    - entity: device_tracker.smartphone_david_bt
      icon: mdi:bluetooth
  state_image:
    "home": /local/images/David.JPG
    "not_home": /local/images/David_bw.JPG
  title: "David"

The result:

3 Likes

Gotcha.

I did notice as well though, for entities the documentation states that you can change an entity image using the icon variable

icon

(string)(Optional)Overwrites icon or entity picture.

Think it’s something to do with the person entity itself at the moment then.

Feature request :smiley:

See here. I set this up for myself today.

3 Likes

Thanks for the help, MizterB’s solution works great!

place an image in the www/ directory.

if configuring your entity via YAML:

customize:
  person.derek:
    entity_picture: "/local/derek.png"
1 Like

this depends of an integration called customize. I got no such integration.
You should mention, whats that about.

Integration not found: customize

In configuration.yaml at the very top add:

homeassistant:

It used to be in the default but isn’t anymore. Then you can add a customize: under that

homeassistant:
  customize:
1 Like

the config is now “not complaining anymore”… still my user has no profile picture… I now have to look for, what consequence the config now has. It must have an outcome anywhere…

So I was struggling with that as well as I’ve just started.

  • Enable advanced mode in your profile page (click on your letter bottom left of the burger menu)
  • Now in Configuration -> Customization select the person you want to assign your profile picture to.
  • Click on Pick an attribute to override.
  • For entity name enter entity_picture
  • For entity value enter the path to your file (config/www/image.jpg the path will be /local/image.jpg).
9 Likes

Thank you (:

When I do this I get this error message : " It seems that your configuration.yaml doesn’t properly include customize.yaml.
Changes made here are written in it, but will not be applied after a configuration reload unless the include is in place." I included the customize and then I have issues with config saying its not setup properly. Any insight?

Needed this too, just added the custimize in the customize.yaml and that almost did the trick. Did it via gui with quotes and it messed up. Just a note, if you reload via the Gui, it doesn’t pick up the new picture names. I had to restart HA in order for it to pick up.

I can’t seem to get my people icons to show up in HA… my configuration file includes the following below… Do I need to change my photo location to a “/local/…” directory?

# PEEPS
person:
  - name: J
    id: J
    device_trackers:
      - device_tracker.j
  - name: K
    id: K
    device_trackers:
      - device_tracker.iphone

homeassistant:
  customize:
    person.J:
      entity_picture: /config/www/J.jpg
    person.K:
      entity_picture: /config/www/K.jpg

Www==local directory. Did you try /config/local/??

Thanks @DavidFW1960. I changed my configuration to to following but I still don’t see the pictures pop up. I cleared my cache… but still don’t see the images pop up.

homeassistant:
  customize:
    person.J:
      entity_picture: /config/local/J.jpg
    person.K:
      entity_picture: /config/local/K.jpg

Actually, I believe /local/J.jpg and /local/K.jpg should do it.

1 Like

indeed. mine are in /local/images
I just knew www was wrong and didn’t check my config…