Resources & YAML¶
HACS registers the resource automatically. After a manual install you have to tell Home Assistant where the JavaScript file of the Header Position Card lives.
Register the resource (UI)¶
- Go to Settings → Dashboards.
- Open the ⋮ (three dots) menu → Resources.
- Click Add Resource.
| Field | Value |
|---|---|
| URL | /local/header-position-card.js |
| Resource type | JavaScript Module |
Missing Resources menu?
Enable Advanced Mode in your user profile (Settings → Profile → Advanced Mode) – otherwise the Resources entry is hidden.
/local/ is the alias for <config>/www/, so /local/header-position-card.js points to <config>/www/header-position-card.js.
Register the resource (YAML)¶
You can also add the resource to your Lovelace configuration:
Wrong resource type
type: module is required. If you use type: js the card silently fails and Home Assistant will tell you the card type is unknown.
Add the card to a dashboard¶
Either use the editor:
- Open your dashboard and click Edit.
- Click Add Card.
- Search for Header Position Card and configure it visually.
…or edit the YAML directly:
Loading order¶
Resources are loaded once per browser session. After changing anything:
- Save the dashboard.
- Hard refresh the page (Ctrl/Cmd + Shift + R) or clear the cache.
- If the card still does not show up, reload resources via ⋮ menu → Reload resources.