I got tired of losing dashboard history and not being able to use VS Code to edit Lovelace configs, so I built a small CLI tool. It pulls dashboard YAML from HA via the WebSocket API, lets you diff/edit/push, and plays nicely with git. Sharing here in case it's useful to others โ feedback and bug reports very welcome.
Here is the link to git repo: https://github.com/gevgev/hadsync
What it does:
- Pulls any or all Lovelace dashboards from a live HA instance to local YAML files via the HA WebSocket API โ no manual export, no copy-pasting from the UI
- Push locally edited YAML back to HA with pre-push validation and confirmation prompt
- Diff local state vs live HA state before committing any changes โ see exactly what will change before it does
- Git-friendly by design: one directory per dashboard, plain YAML files, state and cache files auto-excluded via
.gitignore - Two-repo setup: tool source and dashboard YAML live in separate repos โ your dashboard history is independent of tool version history
- Token security: HA long-lived access token always referenced via environment variable, never stored in config
--dry-run,--yes,--json-outputand other global flags for scripting and CI use
Install:
bash
# from source with uv (recommended)
uv tool install /path/to/hadsync
# editable install โ changes take effect immediately
uv tool install --editable /path/to/hadsync
Requires Python 3.11+.
Quick workflow:
bash
export HA_TOKEN=eyJ...
mkdir home-assistant-dashboards && cd home-assistant-dashboards
git init
hadsync init # interactive setup, creates .hadsync.yaml
hadsync pull # pull all dashboards to local YAML
code . # edit in VS Code
hadsync diff # review what changed
hadsync validate # validate before pushing
hadsync push # push back to HA
git commit -am "tweaked battery dashboard layout"
GitHub: GitHub - gevgev/hadsync ยท GitHub
Work in progress โ Phase 1 complete, actively developing
Phase 1 (pull / push / diff / validate / status / state tracking) is complete and working. I'm currently moving into Phase 2: entity ID validation โ the tool will validate entity IDs in your dashboard YAML against a cached registry pulled from your live HA instance, catching broken references before they reach your dashboard.
The full design document with the phased roadmap (entity validation โ schema validation โ watch mode โ VS Code extension) is in the repo if you want to see where this is heading.
This is still early. If you try it and hit issues โ especially around unusual dashboard configurations, custom components, or non-standard HA setups โ bug reports and feedback are exactly what I need right now. PRs also welcome.
Tested against Home Assistant 2026.5.

