Change Red text on a badge

Is there any way you can change the text in the red bubble that shows up on top of the badge? I’d like to make that the state and fill the badge with an image.

I thought it would be something like:

badges:
  - entity: person.james
    name: James
    unit_of_measurement_template: test
  - entity: sensor.james_watch
    name: James
    image: [url]
    unit_of_measurement: test

However, this doesn’t work at all (neither of them get the “test” text.

the James_watch entity is a espresense entity and I’m hoping to have it replace the person when it detects a room.

Thanks,