Entity attributes in map card

Hello,
When setting up a map card, I am trying to understand if it would be possible to use as a label mode the attribute of an entity, instead of its state.

I couldn’t find any way to do it. Maybe a template?

Thanks

A template sensor