REST sensor with custom friendly_name

I’ve searched this and found similar but not exactly the same question, so apologies if I’ve missed something and this is a duplicate

I want to pull some data from an API, and I want my sensor (when displayed in lovelace) to have both a name and value derived from data in the API.

How am I best to acheive this? The only ways I can see are to manually customise the name.

Thanks