Skip to content

v0.8.0 - EXIF, GPS & reverse geocoding

Choose a tag to compare

@eyalgal eyalgal released this 21 May 15:55
512bc70

This release brings first-class EXIF metadata, GPS coordinates, and optional reverse geocoding to local-folder and NAS album sources. Local entries now feed the same date filters, "On this day" rotations, and ordering modes that Google Photos albums already enjoyed, and surface a human-readable location label.

Thanks to @gargross for surfacing the original gap in #11 / #12 and exploring the design space.

✨ Highlights

EXIF capture date

Each photo's EXIF DateTimeOriginal is honoured — with OffsetTimeOriginal for timezone-correct timestamps when present, host-local fallback otherwise. A final file-mtime fallback keeps screenshots and scans sortable even when EXIF is missing. Exposed via the existing captured_at / captured_at_primary attributes and feeds the Date filter select (last 7 days, on this day, newest taken…) for local-folder albums just like it does for Google Photos.

GPS coordinates

Latitude/longitude are parsed from the EXIF GPS IFD, sign-corrected from N/S/E/W refs, with a (0, 0) null-island guard. New latitude / longitude camera attributes — handy for templating, history map cards, or geo_location automations.

Optional reverse geocoding

A new location attribute such as "New York, United States" is populated via the public OpenStreetMap Nominatim service. Coordinates are rounded to ~100 m and the result is cached on disk, so the same neighbourhood is only ever fetched once. The lookup follows Nominatim's usage policy: 1.1 s throttle, descriptive User-Agent including the integration version + repo URL, 429-aware backoff. _nominatim_lookup never raises — a flaky network must not stop the slideshow.

Per-album opt-out

Settings → Devices & Services → your albumConfigure → "Reverse-geocode EXIF GPS coordinates". Coordinates always stay local; only the geocode call is gated. latitude / longitude keep working with reverse-geocoding off.

Background enrichment

Enrichment runs after every coordinator refresh as a cancellable hass.async_create_background_task — refresh latency is unchanged. An exif_scanned flag round-trips through the items cache, so an HA restart doesn't re-decode every JPEG on disk, and _merge_prior_enrichment backfills enriched metadata by URL so renaming/moving files doesn't lose it.

Enrichment progress sensor

A new diagnostic sensor Enrichment progress (percentage, with phase / exif_done / exif_total / geocode_done / geocode_total attributes). Shown only for local-folder entries. Handy for spotting the very first refresh on a large library.

🛡️ Hardening

  • Items cache versioned (v2), geocode cache versioned (v1) with -0.0 key normalisation so sign-of-zero quirks don't fragment the cache.
  • _nominatim_lookup is exception-proof (network errors, HTTP 5xx, 429, malformed JSON, session exceptions all return None).
  • Pillow declared explicitly in manifest.json requirements.
  • OptionsFlow no longer assigns self.config_entry in __init__ — Home Assistant 2024.12+ exposes that as a managed property and the previous pattern surfaced as a 500 when clicking Configure.

🧪 CI

  • New .github/workflows/tests.yaml runs the suite on Python 3.11 + 3.12. 121 / 121 tests pass.
  • New .github/workflows/release.yaml builds and attaches album_slideshow.zip on every v* tag automatically, so HACS always finds the asset.

Issues closed

  • Closes #9 (EXIF capture date on local folders)
  • Closes #10 (reverse geocoding)
  • Closes #13 (polish / hardening)
  • Supersedes #11, #12

Upgrade

  • HACS: HACS → Album Slideshow → Update. Restart Home Assistant after the install completes.
  • Manual: copy custom_components/album_slideshow from the v0.8.0 tag into your config/custom_components/ and restart HA.

Privacy note

If you don't want any coordinates sent to OpenStreetMap, open the album's Configure dialog and turn off Reverse-geocode EXIF GPS coordinates. latitude / longitude are still populated locally; only the location label is suppressed.