Skip to content

v0.8.2 - Earlier card registration to fix intermittent custom-element errors

Choose a tag to compare

@github-actions github-actions released this 22 May 15:30

Patch release narrowing the startup race that produced occasional "Configuration error: Custom element doesn't exist: album-slideshow-card" on tablets even after v0.8.1. The script was loading (the v0.8.1 console banner confirmed it), just sometimes a beat after the dashboard rendered the card slot, and Home Assistant does not re-render a slot once the element later gets defined.

Fixed

  • Intermittent custom-element errors on slow devices. The integration now registers the card during async_setup (i.e. as soon as HA loads the integration), instead of waiting for async_setup_entry (which can take several seconds because the cloud-polling coordinator does its first refresh first). The earlier registration window dramatically shrinks the period in which a tablet can open the dashboard before customElements.define() has run.
  • Late retry for storage-mode resource registration. A homeassistant_started listener retries the Lovelace storage-resource registration once HA finishes starting. The storage-resource path is the only mechanism that gates dashboard render on resource load; add_extra_js_url only injects a <script> tag with no ordering guarantee. If hass.data['lovelace'] was not yet populated when async_setup ran, the retry catches it.

Changed

  • manifest.json declares frontend as an explicit dependency so HA loads the frontend before our async_setup runs.
  • Dropped the inline Nominatim URL from the OptionsFlow translation string (carried over from the fix that landed on main between v0.8.1 and v0.8.2). This unbreaks the Validate (hassfest) workflow that had been red since the v0.8.0 OptionsFlow merge.

Notes for users still hitting the error

  • After upgrading, restart Home Assistant and hard-refresh the tablet once (Cmd-Shift-R or the browser's force-reload). The script lands in the HTTP cache on first load; subsequent loads win the race instantly.
  • Confirm the resource shows up under Settings -> Dashboards -> three-dot menu -> Resources. It should read /album_slideshow_static/album-slideshow-card.js?v=0.8.2 with type "JavaScript Module".
  • If your dashboard is in YAML mode (mode: yaml) the storage-mode resources collection is invisible to it. Add the resource explicitly to your dashboard YAML so it loads as part of the Lovelace bootstrap:
    resources:
      - url: /album_slideshow_static/album-slideshow-card.js
        type: module

Upgrading

  1. HACS -> Album Slideshow Camera -> three-dot menu -> Redownload, pick v0.8.2.
  2. Restart Home Assistant.
  3. Hard-refresh the dashboard on each device.

Full changelog: v0.8.1...v0.8.2