A lightweight Home Assistant add-on that provides a simple text editor for configuration files with YAML and JSON syntax highlighting, entity autocomplete, and Home Assistant config validation after saving.
- Lightweight CodeMirror 6 editor (~1MB, 10x smaller than Monaco)
- Real-time client validation: Blocks saving if there are YAML or JSON syntax errors
- One-click "Restore Valid State" to quickly undo broken configuration edits
- Home Assistant config validation after save using the same config check API as Developer Tools
- Entity autocomplete (substring matching from live HA API)
- VS Code-style file tree with expand/collapse and indentation guides
- Rainbow indentation for YAML structure visualization
- Configurable indentation guides with colored spaces or vertical lines and adjustable opacity
- Dark/light theme with automatic system preference detection
- Optional Prettier formatting for YAML and JSON when saving
- State persistence - remembers last opened file
- Tree browser with folder navigation
- Auto-backup on every save (creates
.backupfiles) - Multi-architecture support (amd64, aarch64, armv7, armhf, i386)
- Ingress support - runs securely within Home Assistant
Click the button below to add this repository to your Home Assistant:
- In Home Assistant, go to Settings → Add-ons → Add-on Store
- Click the three dots menu (top right) → Repositories
- Add this repository URL:
https://github.com/roman-pinchuk/conf-edit-ha - Find "Configuration Editor" in the add-on store and click Install
- Start the add-on
- Access via the sidebar panel "Config Editor"
Visual settings are available immediately from the gear button in the editor. Use it to change the theme, indentation guides, guide opacity, font size, line wrapping, and rainbow brackets.
Enable Format YAML and JSON on save in the appearance settings to apply Prettier formatting before saving. It is disabled by default.
- Open the add-on from the Home Assistant sidebar
- Select a YAML, JSON, Python, or shell file from the file browser
- Edit the file with syntax highlighting
- Type to get entity autocomplete suggestions
- Real-time validation will instantly detect YAML or JSON syntax errors and block saving. YAML files also provide entity suggestions. You can click Restore Valid State to easily undo invalid edits.
- Click "Save" to save changes (creates automatic backup)
- Review the Home Assistant validation result in the status bar
- If backend validation fails, click or tap the status bar to expand the full error details
- All file operations are restricted to
/configdirectory - Automatic backups created before each save
- No external dependencies or internet access required
# Build everything and run
make build run
# Or step by step:
make build-frontend # Build frontend
make build-docker # Build Docker image
make run # Start container
# View logs
make logs
# Restart after changes
make restartThe add-on automatically builds for all supported architectures when published to Home Assistant. For local multi-arch testing:
make build-multiarchSee BUILD.md for detailed build instructions.
conf-edit-ha/
├── app.py # Flask backend
├── frontend/ # TypeScript + Vite frontend
│ ├── src/
│ │ ├── main.ts # App entry point
│ │ ├── editor.ts # CodeMirror setup
│ │ ├── api.ts # API client
│ │ └── theme.ts # Theme management
│ └── styles.css # VS Code-style CSS
├── static/ # Built frontend (generated)
├── config.yaml # Add-on configuration
├── build.yaml # Multi-arch build config
└── Dockerfile # Container definition
For issues and feature requests, visit: GitHub Issues
This project is licensed under the MIT License.
