HA Context Export is a Home Assistant custom integration that creates a sanitized snapshot of your Home Assistant configuration for technical analysis, documentation, and AI-assisted troubleshooting.
It is not a backup and is not intended for restoration.
- Entity registry metadata
- Device metadata
- Areas
- Helper configuration where safely available
- YAML configuration files (sanitized)
- Lovelace dashboards and resources
- Installed custom integration metadata
secrets.yaml- Home Assistant authentication data
- Raw
core.config_entries - Databases, logs, media, and backups
- Entity unique IDs
- Device MAC/network identifiers and serial numbers
- Current entity state values
- Precise GPS/location data
Sensitive-looking keys and common token formats are redacted on a best-effort basis before the export is written.
This repository can be added to HACS as a Custom repository of type Integration.
- Open HACS.
- Open the menu in the top-right corner.
- Choose Custom repositories.
- Add this repository URL and select Integration.
- Download HA Context Export.
- Restart Home Assistant.
- Go to Settings → Devices & services → Add integration.
- Search for HA Context Export and add it.
The integration automatically loads its Lovelace card; no separate frontend repository or Lovelace resource is required.
After installing or updating the integration and restarting Home Assistant:
- Edit a dashboard.
- Choose Add card.
- Select HA Context Export.
- Press Export erstellen & herunterladen.
The card creates a fresh sanitized export through an authenticated Home Assistant API call and then starts a real browser download. It deliberately avoids Home Assistant markdown links and SPA routing, which can swallow ordinary download-link clicks.
If the card picker does not list the card, it can also be added manually:
type: custom:ha-context-export-cardHome Assistant also exposes an Export context button entity / ha_context_export.create action. Those create an export and show fallback download links in a persistent Home Assistant notification.
The ZIP stays on the Home Assistant instance until it is replaced by a newer export.
The ZIP is stored below Home Assistant's private .storage directory and is never placed in /config/www.
The dashboard card itself talks to an authenticated, administrator-only API endpoint. Once an export has been generated, HA Context Export creates a cryptographically random short-lived capability URL for the binary download. The token:
- is returned only to the authenticated frontend or embedded in a fallback notification link,
- expires after 60 minutes,
- is replaced whenever a new export is created,
- is checked with constant-time comparison before the ZIP is served.
Requests without the current valid token cannot download the export. The response is marked no-store and uses a no-referrer policy.
Automatic sanitization cannot prove that arbitrary user-authored text contains no sensitive information. Review an export before sharing it outside your own trusted workflow.
MIT