How the heck do I dynamically set Person picture?

So I use Discord avatars as Home Assistant Person pictures. I can set picture using customize.yaml like this:


It works. But when somebody changes their avatar, it’s URL changes and picture disappears. And I have to manually update the URL in customize.yaml.
I have my custom component which creates a sensor and that sensor has the avatar as it’s entity-picture and that updates whenever the user changes it’s avatar. I want to use that picture as the Person’s entity_picture, but AFAIK there is now no way to do that.

You could set the attribute from your custom component in the states.