How the heck can I set this user picture?

See terrible doodle below; How can we set the picture for users?

I have successfully set a picture on my person.tyler entity, and linked that to my user in settings. But no profile picture appears in the UI!

This color is determined by tinting the sidebar selected color white, and then putting the first letter of your name in capital. You could write a custom JS plugin.
Also if you want this, you could always write a feature request.

There is an open PR for a image upload :wink: We are definitely working on getting person entities more involved in the UI

9 Likes

Sweet! Thanks

In the meantime I made an ad-hoc script… Just change the picsum.photos/500 to your profile pic.

var badge = document.querySelector("home-assistant").shadowRoot.querySelector("home-assistant-main").
                     shadowRoot.querySelector("ha-sidebar").shadowRoot.querySelector("ha-user-badge");
badge.style.maxHeight = "40px";
badge.style.maxWidth = "40px";
badge = badge.shadowRoot;
var profilepic = document.createElement("img");
profilepic.src = "https://picsum.photos/500";
profilepic.style.objectFit = "cover";
profilepic.style.maxWidth = "40px";
profilepic.style.maxHeight = "40px";
profilepic.onload = function() {
  badge.innerHTML = "<img" + badge.innerHTML.split("<img")[1];
};
badge.appendChild(profilepic);

Would love that!

:eyes:
image

3 Likes

Does this mean you are implementing this Bram? :smiley:

@zsarnett, you mention that there is an open PR, could you link it?

It is merged and in nightly right now (the image upload) the sidebar icon is being worked on