v0.8.2 - Earlier card registration to fix intermittent custom-element errors
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 forasync_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 beforecustomElements.define()has run. - Late retry for storage-mode resource registration. A
homeassistant_startedlistener 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_urlonly injects a<script>tag with no ordering guarantee. Ifhass.data['lovelace']was not yet populated whenasync_setupran, the retry catches it.
Changed
manifest.jsondeclaresfrontendas an explicit dependency so HA loads the frontend before ourasync_setupruns.- Dropped the inline Nominatim URL from the OptionsFlow translation string (carried over from the fix that landed on
mainbetween v0.8.1 and v0.8.2). This unbreaks theValidate(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.2with 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
- HACS -> Album Slideshow Camera -> three-dot menu -> Redownload, pick v0.8.2.
- Restart Home Assistant.
- Hard-refresh the dashboard on each device.
Full changelog: v0.8.1...v0.8.2