Showing profile picture for the current user

I’m setting up a greeting at the top of the dashboard where I’d like to have a card that says “Hello, [user]” and shows the profile picture associated with that user.

The text I’ve got working by putting “{{user}}”. But the profile picture I’m having a hard time with. I’ve tried using a person card, entity, template, etc. But I’m not sure how to dynamically reference the current user with their picture.

In trying to find the same answer for myself I stubbled across your post. I asked the question in the Fun with custom:button-card thread and was given the answer. Not sure if this helps you but it solved it for me.

type: custom:button-card
entity: '[[[ return "person." + user.name.toLowerCase(); ]]]'
show_entity_picture: true
name: |
  [[[
    return "Hi "+ user.name + "!"
  ]]]
styles:
  grid:
    - grid-template-areas: '"i" "n"'
  icon:
    - width: 70px
  img_cell:
    - border-radius: 515px
    - width: 70px
    - height: 70px
  card:
    - margin: 0
    - border-radius: 20px
    - padding: 5px 5px 5px 1px
  name:
    - font-weight: bold
    - font-size: 25px

image

1 Like