Transform your Home Assistant configuration with the power of AI
Installation โข Features โข Documentation โข Support
OpenCode brings the revolutionary 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).
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.
|
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. Works with 75+ AI providers: Anthropic, OpenAI, Google, Groq, Ollama, and many more. |
41 tools, 14 resources, and 6 guided prompts for comprehensive Home Assistant interaction. 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. Multi-layered checks are designed to prevent AI-written config from breaking your HA instance. 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. Tracks Home Assistant's emerging 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 75+ AI providers. Choose the one that fits your needs:
๐ฅ Popular Providers (Click to expand)
| Provider | Available Models |
|---|---|
| ๐ง Anthropic | Claude 4 Opus, Claude 4 Sonnet, Claude 3.5 Sonnet, Claude 3.5 Haiku |
| ๐ OpenAI | GPT-4o, GPT-4 Turbo, o1, o1-mini, o3-mini |
| ๐ Google | Gemini 2.0 Flash, Gemini 1.5 Pro, Gemini 1.5 Flash |
| โ๏ธ AWS Bedrock | Claude, Llama, Mistral (via AWS) |
| ๐ท Azure OpenAI | GPT-4, GPT-4 Turbo (Azure hosted) |
| โก Groq | Llama 3, Mixtral (ultra-fast inference) |
| ๐ฏ Mistral | Mistral Large, Mistral Medium, Codestral |
| ๐ฆ Ollama | Local models โ see the local model notes before choosing hardware |
| ๐ OpenRouter | 100+ models through single API |
| ๐ค Together AI | Llama, Mixtral, and open models |
| ๐ฅ Fireworks AI | Fast inference for open models |
| ๐ xAI | Grok models |
| ๐ซ Deepseek | Deepseek Coder, 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.
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.
โ๏ธ 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.
-
Add this repository to Home Assistant:
Or add manually
Go to Settings โ Add-ons โ Add-on Store โ โฎ โ Repositories
Add:
https://github.com/magnusoverli/opencode -
Install the add-on:
- Find "OpenCode" in the add-on store
- Click Install
-
Start using it:
- Start the add-on
- Click Open Web UI (or use the sidebar)
- Run
opencodeand use/connectto configure your AI provider
๐ก 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.
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
- ๐ฅ HA Repairs integration โ surfaces your installation's active deprecation warnings
โ ๏ธ Structural checks โ catches missing triggers, actions, and other required fields
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 developing a native llm integration so Core integrations and custom integrations can expose curated tools to Assist through <integration>/llm.py and registered LLM APIs over /api/mcp/<API ID>. OpenCode will follow this work closely and aims to be a premium consumer of the agent capabilities Home Assistant makes available.
Today, the add-on keeps MCP as the complete working tool surface, adds readiness reporting through get_agent_capabilities / ha://agent/capabilities, provides compact get_home_context discovery, and includes a native LLM provider guide for custom integration authors. The beta channel can opt into a configurable native MCP bridge targeting /api/mcp/<API ID> with assist as the default. As HA-native LLM capabilities become stable and accessible to add-ons, OpenCode will prefer native HA tools where they fit while keeping MCP for safe config writing, validation, admin/dev workflows, screenshots, firmware updates, and 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
Once installed and connected to an AI provider, try these commands:
# 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"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
Installation โข Features โข Documentation โข Support


