Skip to content

✨ New Features & πŸ› Bug Fix

Latest

Choose a tag to compare

@cataseven cataseven released this 10 Oct 18:41
a68c8a3

πŸ–ΌοΈ Fixed: some trackers showed no marker icon (CORS)

If some of your trackers drew their photo on the map and others didn't β€” most often the ones from the Google Maps integration β€” this is fixed.

What was going on. The card draws a marker's photo into a round icon on a canvas, and reading that canvas back requires the image host to allow it (an Access-Control-Allow-Origin header). Google's account photos (lh3.googleusercontent.com) don't send it, so the image couldn't be read and the marker ended up with no icon at all. Confusingly, the popup showed the very same photo perfectly β€” because simply displaying an image never needs that permission; only reading its pixels does.

Now: when the photo can't be read back, the card shows it as the marker anyway, using the image directly. You get the picture β€” square rather than round, and without the GPS-accuracy ring or name label composited on top β€” instead of an empty marker. Everything else is unchanged, and pictures served from Home Assistant keep their usual round icon.

Want the round icon back for those entities? Either:

  • copy the photo into /config/www and point the entity at it (/local/...), or set it per entity:
entities:
  - entity: device_tracker.someone
    picture: /local/someone.png
  • or route images through a CORS proxy:
media_proxy: https://your-proxy/?url=

The browser console also prints a single explanatory line the first time this happens, naming the picture URL, so it's clear which entity is affected.

πŸ•°οΈ New: history for trackers that upload late (#95)

image

Some trackers keep recording while they're offline and upload everything once they reconnect. Home Assistant stamps each position with the moment it arrived, so those trails came out scrambled β€” a fix taken at 07:40 but uploaded at 09:00 was drawn at 09:00, and could even fall outside the date range it belonged to.

If your tracker also reports when it actually took the fix, tell the card which attribute holds it:

entities:
  - entity: device_tracker.my_gps
    hours_to_show: 24
    history_timestamp_attribute: fix_timestamp
    history_timestamp_lookahead_hours: 24   # optional, default 24

What you get

  • The trail, dots, popup Recorded at, speed estimate and the playback timeline all follow the real fix time. A dot's popup also says when Home Assistant received it, if that was a minute or more later.
  • For a past date range, the card also looks at what arrived in the hours after the range ended (history_timestamp_lookahead_hours), so late uploads land where they belong.
  • Late points that stream in live are slotted into the trail at their fix time instead of being stuck on the end.
  • Works for person entities too β€” the card reads the fix time from the person's own device trackers (when none of them report one, the person's usual trail is shown).

Accepts epoch seconds/milliseconds or ISO-8601. Values it can't read fall back to the normal time for that point, and the browser console tells you once if the attribute isn't found at all. Both options are also in the visual editor (entity β†’ History tab). Without the option, nothing changes.

πŸ”§ Also fixed

  • History trail could keep part of an old path after a reload. When the card re-read history (for example after switching dashboard views) and got back the same number of points or more, it could leave stale segments of the previous trail on the map. The trail is now redrawn from scratch after every history reload.