Map-card: a slightly improved map-card

How to hide private data

When we post a screenshot in Community or Github, it is desired to hide a private information like a position of your home & people’s avatars.
This can be done by card-mod:

type: custom:map-card
entities:
  - person.ildar
card_mod:
  style:
    map-card-entity-marker $: |
      .marker .entity-picture  {
        background-color: var(--card-background-color);
        background-image: url('/local/images/test/cat_avatar.png') !important;
        border: 1px solid var(--disabled-color);
      }
    .: |
      .leaflet-tile-pane {
        display: none;
      }

image

Add a “replacement” image (of course it should be a cat) to your images in “www” folder.

Similar (not same) can be used for a standard Map card:

        type: map
        entities:
          - person.ildar
        card_mod:
          style:
            ha-map $: |
              .leaflet-tile-pane {
                display: none !important;
              }
            ha-map $ ha-entity-marker $: |
              .marker .entity-picture  {
                background-color: var(--card-background-color);
                background-image: url('/local/images/test/cat_avatar.png') !important;
                border: 1px solid var(--disabled-color);
              }

image