Transform your Home Assistant configuration with the power of AI
Getting Started • Features • Documentation • Support
Upstream attribution: This is an independent Home Assistant add-on that redistributes and integrates OpenCode, © 2025 opencode, under the MIT License. It is not made by, affiliated with, or endorsed by the OpenCode team or Anomaly. See the third-party notices.
⚙️ Hardware requirement: on x86-64, OpenCode needs a CPU with SSE4.2 (Intel Nehalem/2008 or newer, AMD Bulldozer/2011 or Jaguar/2013 or newer). Older processors cannot run it at all — it exits with
Illegal instruction (core dumped). ARM64 is unaffected. See CPU requirements for details.
Or add manually
Go to Settings → Add-ons → Add-on Store → ⋮ → Repositories
Add: https://github.com/magnusoverli/opencode
Find "OpenCode" in the add-on store and click Install.
💡 Prefer the beta channel to try new features early? Install "OpenCode Beta" from the same repository instead — it installs side by side with the stable add-on. See Release channels.
Start the add-on, then click Open Web UI (or use the sidebar entry). By default you'll land in a web terminal.
💡 Prefer a graphical interface? Set Interface Mode to
openchamberin the add-on Configuration tab and restart to swap the terminal for the OpenChamber web UI on the same sidebar entry. The defaultterminalmode is unchanged.
Run opencode, then /connect and follow the prompts to authenticate — Anthropic (Claude) is recommended, or pick OpenAI, Google, OpenCode Zen (curated coding models, no setup required), or any of the 70+ other supported providers.
Once connected, ask OpenCode things like:
# Create a new automation
"Create an automation that turns on lights when motion is detected"
# Review your configuration
"Check my configuration.yaml for any issues"
# Add sensors
"Add a template sensor to track my total energy usage"
# Get entity information
"What's the current state of all my lights?"
# Troubleshoot
"Why isn't my bedroom motion sensor triggering automations?"
# Analyze history
"Show me temperature trends for the past 24 hours"OpenCode brings the OpenCode AI coding agent directly into your Home Assistant instance. Experience intelligent configuration editing through natural language, advanced YAML assistance, and deep integration via the Model Context Protocol (MCP) — with a growing set of features that help it understand your installation, not just configuration syntax in general.
|
Use natural language to modify your Home Assistant configuration. No more searching documentation - just ask! Choose your experience from the sidebar: a beautiful web terminal with 10 themes, or the graphical OpenChamber web UI — both served through Home Assistant Ingress. Either can also be opted into a mappable LAN port for reverse proxies and remote clients. Works with Anthropic, OpenAI, Google, and 70+ other AI providers. Optional PPQ private-mode proxy routes requests to models running in remote trusted execution environments — encrypted end to end, with nothing exposed on the network. Choose a |
47 tools, 14 resources, and 6 guided prompts spanning state and service calls, history, config validation, calendars, decision notes, update and firmware management, ESPHome, Supervisor diagnostics, and CLI gateways. Sessions start knowing your installation instead of rediscovering it. A generated briefing describes your setup, Smart YAML editing with entity autocomplete, live hover information, deprecation warnings, and go-to-definition support. Validated config pipeline with automatic backup/restore and guardrails against accidental data loss. Direct file edits and in-place shell writes now ask for approval before touching disk, too. Includes the Home Assistant Builder CLI by @balloob — a CLI purpose-built for AI agents to manage Home Assistant via REST and WebSocket APIs. Enables dashboard CRUD, area/floor management, helper creation, backup/restore, and bulk admin operations that would otherwise require direct API calls or UI interaction. An opt-in, persistent place for your own scripts to run at add-on startup — everything else in the container is rebuilt from the image on every restart, so this is the supported way to make your own customizations stick. Home Assistant's native |
OpenCode is an open-source AI coding agent that transforms how you interact with your codebase. It understands your files, executes commands, and helps you build and maintain software using natural language.
Think of it as your personal expert developer who:
- 📖 Reads and understands your entire configuration
- ✏️ Suggests and implements improvements
- 🐛 Finds and fixes bugs automatically
- 🚀 Implements new features on request
- 💬 Explains complex configurations in plain English
OpenCode works with Anthropic, OpenAI, Google, and 70+ other AI providers. Choose the one that fits your needs:
🔥 Popular Providers (Click to expand)
| Provider | Notes |
|---|---|
| 🧠 Anthropic | Claude models — recommended for configuration work |
| 💎 OpenAI | GPT and o-series reasoning models |
| Gemini models | |
| ☁️ AWS Bedrock | Claude, Llama, Mistral, and others via AWS |
| 🔷 Azure OpenAI | Azure-hosted OpenAI models |
| ⚡ Groq | Ultra-fast inference for open models |
| 🎯 Mistral | Mistral and Codestral models |
| 🦙 Ollama | Local models — see the local model notes before choosing hardware |
| 🌐 OpenRouter | 100+ models through a single API |
| 🤝 Together AI | Llama, Mixtral, and other open models |
| 🔥 Fireworks AI | Fast inference for open models |
| 🚀 xAI | Grok models |
| 💫 Deepseek | Deepseek Coder and Deepseek Chat |
Running models locally? The add-on sends a large tools-and-instructions prompt on every request. Read the local model notes first — a small model on modest hardware can take minutes per reply. A smaller MCP tool profile (see Features) is one of the easiest ways to cut that cost.
Start immediately with OpenCode Zen - no API keys or subscriptions required! Get access to curated models optimized for coding tasks, perfect for trying OpenCode or for users who prefer not to manage their own API keys.
Simply run /connect and select OpenCode Zen to get started for free.
This add-on has read/write access to your Home Assistant configuration directory.
It also mounts Home Assistant add-on development folders (/addons and /addon_configs) so OpenCode can help with custom add-ons. Treat /addon_configs as sensitive because it may contain configuration data for other add-ons.
OpenCode includes a multi-layered validation pipeline designed to prevent AI-written configuration from causing your Home Assistant to fail to start:
- 🔍 Automatic config validation — every config write is validated through HA Core's own check before committing
- ↩️ Automatic backup/restore — if validation fails, the original file is instantly restored
- 🧪 Jinja2 template pre-validation — templates are tested through HA's engine before writing to disk
- 📋 Deprecation scanning — 20+ patterns catch outdated syntax, auto-updated from GitHub and cross-checked against your own instance's live HA Repairs warnings
- ✂️ Guardrails against accidental data loss — large deletions (missing list entries, removed top-level keys, or a file shrinking by more than half) are blocked unless explicitly confirmed
- 🏥 HA Repairs integration — surfaces your installation's active deprecation warnings
⚠️ Structural checks — catches missing triggers, actions, and other required fields- ✅ Approval before direct edits — editing a file outright, in-place shell edits (
yq -i,sed -i,tee), and deleting or renaming files now ask for confirmation first. Only the validated safe-write path skips the prompt, because it already checks itself. - 🔒 Sensitive files stay out of the model's context by default —
secrets.yaml,.storage/,.cloud/,ssl/, and key/cert files are read-protected unless you turn that off.
Additional best practices:
- 💾 Always backup your configuration before significant changes
- 👀 Review changes suggested by the AI before accepting them
- 📝 Use version control (git) when possible for easy rollback
Home Assistant is building native llm platform support directly into Core: the llm integration, per-domain tool platforms, and keyed /api/mcp/<API ID> endpoints all ship for the first time in Home Assistant 2026.8. OpenCode is tracking this closely and aims to be a premium consumer of the agent capabilities Home Assistant makes available.
OpenCode already ships an opt-in Native Home Assistant MCP bridge (beta) that targets these endpoints, falling back to the older configured /api/mcp endpoint on earlier Home Assistant versions and retrying periodically — so an already-running add-on picks up a Home Assistant upgrade on its own. Turning it on takes two one-time steps: add the Model Context Protocol Server integration in Home Assistant, then enable the bridge and restart the add-on. get_agent_capabilities reports whether the bridge is enabled and actually reachable, rather than leaving a stalled bridge to look like a broken configuration.
OpenCode's own MCP tools remain the complete, supported working surface regardless of bridge status — this roadmap is about adding native capabilities where they fit well, not replacing safe config writing, validation, admin/dev workflows, screenshots, firmware updates, or troubleshooting.
See the full documentation for the current support status and long-term integration plan.
Comprehensive documentation is available covering all features:
- 📖 Full Add-on Documentation - Complete guide to all features
- 📝 Changelog - Version history and updates
Need help? We've got you covered:
|
Community support & discussions |
Comprehensive guides & tutorials |
Bug reports & feature requests |
We love contributions! Here's how you can help:
- 🍴 Fork the repository
- 🔧 Create your feature branch (
git checkout -b feature/amazing-feature) - 💾 Commit your changes (
git commit -m 'Add amazing feature') - 📤 Push to the branch (
git push origin feature/amazing-feature) - 🎉 Open a Pull Request
Contributions of all kinds are welcome — feel free to open a PR!
Channels are folders, not branches. Both live on main:
ha_opencode/— the stable channel. Taggedv*, published as the OpenCode add-on.ha_opencode_beta/— the beta channel, for work still soaking. Taggedbeta-v*, published as the OpenCode Beta add-on.
Each folder is a complete add-on with its own Dockerfile and rootfs/, so a
stable release cannot contain something that only exists in beta. Put
experimental work in ha_opencode_beta/; touch ha_opencode/ only for changes
that should reach stable users right away.
Both add-ons can be installed side by side — they keep separate decision notes and separate storage. Full details in RELEASING.md.
![]() Magnus Overli Creator & Maintainer |
![]() Teeflo ARM64 fixes, README, icons & logo |
![]() Paulus Schoutsen hab CLI — admin backbone |
See the contributors page for the full list of amazing people who have helped make this project better! |
This is free and unencumbered software released into the public domain - see the UNLICENSE file for details.
This distribution also includes third-party software, including OpenCode. Its copyright notices and license terms are retained in THIRD-PARTY-LICENSES.md and in the add-on image at /usr/share/doc/ha-opencode/NOTICE.
Made with ❤️ for the Home Assistant community


