How to manage Badge content from custom component?

Hi,
I’m developping a custom component (sensor type) and my sensor appear in the view as a badge.
I don’t find anything about managing the badge (icon, label) from my code.

I setted a def icon(self) but this has no impact. What else ?

Regards, Olivier