Map-card: a slightly improved map-card

The history feature of this card makes it incredibly useful, thanks for the work on this!

I live on a boat, and I have zones for where home (the boat) and the anchor location are. I’m updating the zones via various automations.

When I drop the anchor and let out chain, I set the radius of the anchor zone. Then I also set a larger radius for the anchor alarm (if the boat goes outside of the outer radius, HA shouts at me over all of my devices).

Having the visualization of the inner and outer circles is useful, as is the visualization of the boat location over time.

Is there a way to draw the inner and outer circles on your map card so that I can just have a single card on my dashboard?

Thanks!

type: custom:map-card
history_start: 24 hours ago
entities:
  - entity: zone.home
    history_start: 48 hours ago
    display: icon
    size: 25
    history_show_lines: true
    history_show_dots: false
    color: blue
  - entity: zone.anchor_location
    history_start: 5 seconds ago
    display: icon
    size: 25
    history_show_lines: false
    history_show_dots: false
1 Like

I would say this is a good FR:
add a Boolean flag to show circle for a zone; may be defined per entity; meaningful only for zone entities.

Also, similarly a circle may be shown for ANY entity:

  1. For zones - radius is equal to a zone’s radius.
  2. For other entities - radius is equal to a GPS accuracy (if present).

Registered an issue.

1 Like

Does anyone know the tile_layer_url that I can use that is the same as the default HA card?

Thanks

1 Like

What is the right configuration for OpenWeather Weather Maps 2.0?

Here is an example config I’m using (API keys redacted):

type: custom:map-card
focus_entity: zone.home
zoom: 6
card_size: 10
entities:
  - entity: zone.home
    display: icon
    size: 40
tile_layers:
  - url: >-
      https://maps.openweathermap.org/maps/2.0/weather/1h/PR0/{z}/{x}/{y}?appid=<I have replaced this with my actual API key>
    options:
      attribution: <a href="https://openweathermap.org/">OpenWeatherMap</a>
      apikey: <I have replaced this with my actual API key>

It’s not displaying anything and I’ve tried a few different values. Does the attribution key need to be altered in some way?

Assuming the rest of the url is correct replace ?appid=<I have replaced this with my actual API key> with ?appid={apikey}. As per https://nathan.gs/2024/02/25/ha-map-card-displaying-weather-and-other-tilelayers/#creating-the-map

To be sure we’re working toward the same goal…I’m trying to get Map 2.0 (not 1.0) working.

The 1.0 config seems to work with the {apikey} placeholder (as you mentioned) or explicitly replacing it with the actual api key (as I had it) since apikey: is specified on the third line.

For 2.0 (see link I posted above) I tried the same config as what you posted (that’s where I got it from initially) but replaced the 1.0 URL with the 2.0 URL. So, I’m asking if something else (e.g. attribution) also needs adjustment to get 2.0 to work. If so, what are those adjustments?

It would be cool to have an option to simply put an icon instead of a picture, when the sensor do not include it

For example on the map I see the label:

Bildschirmfoto 2024-09-10 um 00.13.44

If I click on it. I have an icon, but into the attributes there is no icon attribute.
Bildschirmfoto 2024-09-10 um 00.13.54

Would be nice, just to use the same logic like the detail dialog and/or give an option on the entity section to override the icon

EDIT: FR is open

Any option like the default map card to refresh so it moves as the entity moves?

There is, like this.

entities:
  - entity: <your_entity>
    display: icon
    size: 40
    picture: /local/icons/icon.png

Picture != icon. See open FR

Icon is just a mdi or phu string like
icon: „mdi:gas-station“

1 Like