Back story, after recently installing a new door lock I realized that badges appear to have three completely different and poorly documented behaviours. What I wanted to achieve was to have a template sensor that displayed an open, close and locked state however I had to kludge a binary sensor with two states and three display states in order to use MDI icons. So now that bage has a display state that differs from what it records in its history which is slightly annoying in terms of at a glance history.
binary sensors: display the icon / icon template in the bubble and have no extra label in their border
sensors: display the state text or the picture / picture template in the bubble, and the label around the frame is the UNIT of measure. The icon is not used.
device trackers / people: display default icon or picture / picture template in the bubble and display the state in the label around the frame.
This inconsistency of how the frame and bubble content works is a little frustrating… It would be nice if we could over ride it in template binary sensors and template sensors to maybe use icons OR pictures and to control the board/label status for both.