How to use badges (e.g. for phone and watch) on person's avatar icon on a map?

Hello!

Under settings/persons, I have both devices, i.e. a phone and a watch assigned to person Bob to be tracked.

I have 2 sensors on a map card:

type: map
entities:
  - entity: person.bob
    name: "Bob"                  # This covers both Bob's phone and watch.
  - entity: device_tracker.bob_watch
    name: "Bob's watch"          # And this covers only his watch.

Or should I rather use it as follows? (as person.bob covers both devices already)

type: map
entities:
  - entity: device_tracker.bob_phone
    name: "Bob' phone"
  - entity: device_tracker.bob_watch
    name: "Bob's watch"

Is there a way to display a little badge in the corner of the respective icon, so the icons (both showing Bob’s avatar) can be better distinguished? (e.g. in case one of the devices is left at home - or anywhere else)

Alternatively, I could create differently looking avatars for 1. Bob/Bob’s phone and 2. Bob’s watch, but I prefer using badges, if possible.

If I am on the wrong track, e.g. that I use these 2 sensors as it is not intended, please also let me know. :wink:

Thanks for your help! :+1:

The map card can show the icon if (!) the sensor has an icon attribute (see map card, label_mode)
Other option is to customize the entity with a picture
customize.yaml

person.somename:
    entity_picture: /local/pictures/somename.png
device_tracker.iphony:
    entity_picture: /local/pictures/samsung.png

if not clear /local/pictures is the homeassistant/www/pictures folder

1 Like

In HA, a “badge” word has many meanings, so I suggest you to specify the exact thing you need. A small picture like this saves lots a time:

To achieve this, you will have to start playing with card-mod.

2 Likes