Is it possible to use a picture or gravatar for a binary sensor? (when it's "on")

I have a binary sensor that reads multiple device trackers to determine if someone is home or not, and everything works great, but I can’t seem to be able to set an image for the binary sensor. I would like to be able to display a person’s picture if they’re home, but all I can get to work are the built-in icons, not pictures or gravatars.

As a fallback I can use the “Home” icon, but I’d really love it if I could display someone’s picture instead.

@gjch Did you ever get this working?

I was able to get something similar working in my testing area. I haven’t figured out how to control the size though. The local image I am using is 100x100 but in Lovelace it’s 310x310.

  - type: picture-entity
    entity: device_tracker.person_mobile
    name: Person
    state_image:
      "home": /local/pictures/person-head-small.jpg
      "not_home": /local/pictures/person-head-away-small.jpg

I think you could also write it as:

  - type: picture-entity
    entity: device_tracker.person_mobile
    name: Person
    image: /local/pictures/person-head-small.jpg
    state_filter:
      "off": grayscale(90%)

Either way when the Person is home a full colour image is shown, when they are away a grayscale image is shown.