You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The interactive map card is currently auto-registered as a classic js Lovelace resource (CARD_RESOURCE_TYPE = "js" in map_card.py). That choice is deliberate: a classic <script> re-executes on every page load even when served from the browser cache, so the custom element is reliably defined before the dashboard renders. An ES module served from cache is not re-executed (the browser keeps its first evaluation in the module map), which caused the intermittent permanent "Configuration error" in #140.
The catch: the js resource type is deprecated in Home Assistant. It still works on all current versions (verified on 2026.6 and 2026.7), but HA may remove it in a future release. When that happens, the card would stop loading for every install that relies on the auto-registered resource.
Proposed enhancement
Switch the card to an ES module resource combined with a per-boot cache-buster, which removes the cached-module failure mode by construction:
Mint a token at integration import time (= every HA start) and append it to the resource URL: /terramow-frontend/terramow-map-card.js?v=<version>-<token>.
The existing self-heal loop updates the stored Lovelace resource on each boot and also flips old js entries to module automatically, so no user action is needed at migration time.
Cost: one Lovelace resource-storage write per HA start. That's why this shouldn't ship while js still works — it adds churn for no user-visible benefit today.
Prepared implementation
The change is fully implemented, tested (100% coverage maintained), and parked in draft PR #147. It is intentionally left unmerged.
Trigger to act
Merge #147 (after rebasing/re-verifying) when any of these happens:
A Home Assistant release note or deprecation warning announces removal of classic js Lovelace resources.
Field reports show the card failing to load on a new HA version while registered as js.
Until then this issue just tracks the need so the deprecation doesn't catch us by surprise.
Background
The interactive map card is currently auto-registered as a classic
jsLovelace resource (CARD_RESOURCE_TYPE = "js"inmap_card.py). That choice is deliberate: a classic<script>re-executes on every page load even when served from the browser cache, so the custom element is reliably defined before the dashboard renders. An ESmoduleserved from cache is not re-executed (the browser keeps its first evaluation in the module map), which caused the intermittent permanent "Configuration error" in #140.The catch: the
jsresource type is deprecated in Home Assistant. It still works on all current versions (verified on 2026.6 and 2026.7), but HA may remove it in a future release. When that happens, the card would stop loading for every install that relies on the auto-registered resource.Proposed enhancement
Switch the card to an ES
moduleresource combined with a per-boot cache-buster, which removes the cached-module failure mode by construction:/terramow-frontend/terramow-map-card.js?v=<version>-<token>.jsentries tomoduleautomatically, so no user action is needed at migration time.Cost: one Lovelace resource-storage write per HA start. That's why this shouldn't ship while
jsstill works — it adds churn for no user-visible benefit today.Prepared implementation
The change is fully implemented, tested (100% coverage maintained), and parked in draft PR #147. It is intentionally left unmerged.
Trigger to act
Merge #147 (after rebasing/re-verifying) when any of these happens:
jsLovelace resources.js.Until then this issue just tracks the need so the deprecation doesn't catch us by surprise.