Home Assistant documents its automations in YAML, and for a lot of people that single fact is the whole reason the “automations” tab stays untouched for months. The visual editor covers the basics, but anything with a template, a condition chain, or a time window that spans midnight tends to push you toward the code view, and the code view is unforgiving. One typo in an entity ID and a working setup stops triggering, silently, until you notice the porch light never came on. A recent account from a longtime tinkerer described exactly this: too intimidated to hand-write an automation, they asked an AI chatbot to draft it instead, pasted the result in, and it worked on the first try. That is the angle here. AI-generated Home Assistant automations do not replace understanding your setup, but they remove the blank-page problem, and the tools below turn a plain description of what you want into YAML or a blueprint you can review before it touches a single device.
What to look for in an AI code companion for Home Assistant
Not every AI coding tool is equally useful for this. The ones worth adopting share a few traits. They understand Home Assistant’s specific YAML dialect (triggers, conditions, actions, the service: versus action: key rename, template sensors) rather than generic YAML. The best of them can read your existing configuration.yaml or automations file directly, so the code they generate references entity IDs you actually have instead of ones it invented. Look for a tool that supports Home Assistant’s Blueprint format, since a blueprint you can reuse across multiple automations is worth more than a one-off script. A dry-run or diff view before anything is applied matters more here than in most coding contexts, because a bad automation can flip a real device. Finally, weigh cloud convenience against local privacy: a tool that sends your entity names and config to a remote API is fine for most households, but not for everyone.
Quick comparison
| Tool | Best for | Type | Free tier | Runs locally |
|---|---|---|---|---|
| ChatGPT | Beginners writing their first automation | Chat / custom GPT | Yes (limited) | No |
| Claude | Reading and refactoring large HA configs | Chat / project | Yes (limited) | No |
| GitHub Copilot Chat | VS Code users with HA config in git | IDE extension | Yes (limited) | No |
| Cursor | A full editor built around HA context | IDE | Yes (limited) | No |
| Continue.dev | Open-source in-editor assistant | IDE extension | Fully free | Yes (with Ollama) |
| Ollama with Home Assistant integration | Local, private automation generation | Local LLM runtime | Fully free | Yes |
| Extended OpenAI Conversation | Piping an LLM directly into HA itself | HACS integration | Fully free (BYO API key) | Optional |
The 7 apps ranked
1. ChatGPT (with Custom GPT), best overall for beginners
ChatGPT is the easiest entry point precisely because it needs no setup beyond a browser tab. Paste a description of what you want (“when the front door opens after 10pm and no one is home, turn on the hallway light at 30 percent for five minutes”) and it returns a complete automation, trigger, condition, and action blocks included. A saved custom GPT primed with your entity list and Home Assistant’s current YAML syntax cuts down on the guessed entity IDs that plague a cold prompt.
Where it falls short: without a custom GPT or pasted context, it will invent entity IDs that look plausible but do not exist in your setup, and it does not know about the service: to action: key rename unless the model version is current.
Pricing:
- Free: GPT-4o mini access with daily limits, enough for occasional automation requests
- Paid: ChatGPT Plus is a monthly subscription with higher limits and the latest model
Platforms: Windows, macOS, Linux (browser and desktop app)
Download: ChatGPT
Bottom line: the tool to try first if you have never asked an AI to write YAML before, because there is nothing to install.
2. Claude, best for reading large HA configs and refactoring
Claude handles long context better than most alternatives, which matters when your automations file has grown to a few hundred lines and you want an AI to understand the whole thing before suggesting a change. Paste an entire automations.yaml and ask it to add a new rule that does not conflict with existing ones, or to refactor five near-duplicate automations into a single blueprint with inputs. Projects let you keep your config attached across a whole session instead of re-pasting it each time.
Where it falls short: the free tier has tighter message limits than ChatGPT’s, which becomes noticeable during an extended back-and-forth debugging session.
Pricing:
- Free: limited daily messages, enough to draft a handful of automations
- Paid: Claude Pro is a monthly subscription with substantially higher limits and longer context
Platforms: Windows, macOS, Linux (browser and desktop app)
Download: Claude
Bottom line: the pick when the task is less “write me one automation” and more “understand my whole config and fix it.”
3. GitHub Copilot Chat, best for VS Code plus a git-tracked HA config
GitHub Copilot Chat lives inside the editor, which is exactly where a HA config that lives in a git repository already sits. Highlight a block of an existing automation, ask Copilot Chat to extend it or fix a condition, and it edits in place with the surrounding YAML as context. Because it reads open files and the workspace, it references your real entity IDs far more reliably than a chat window with no file access.
Where it falls short: it is only as good as what is open in the editor. It will not know about entities defined in files you have not opened, and it has no live connection to your running Home Assistant instance.
Pricing:
- Free: a limited free tier for individual accounts
- Paid: Copilot individual is a monthly subscription with unlimited chat and completions
Platforms: Windows, macOS, Linux (as a VS Code extension)
Download: GitHub Copilot
Bottom line: the natural choice if your Home Assistant config already lives in a git repository and you work in VS Code day to day.
4. Cursor, best full editor with HA context
Cursor is a fork of VS Code built around AI-first editing, and for a Home Assistant config it behaves like Copilot Chat with a tighter integration between chat, inline edits, and multi-file awareness. Its “Ask” mode can index an entire HA config folder and answer questions like “which automations reference the kitchen motion sensor” before you generate anything new, which catches naming conflicts a single-file tool would miss.
Where it falls short: it is a separate editor to adopt, not a plugin for one you already use, so switching has real friction if you are settled into VS Code with Copilot already.
Pricing:
- Free: a usage-limited free tier
- Paid: Cursor Pro is a monthly subscription with higher limits and access to more capable models
Platforms: Windows, macOS, Linux
Download: Cursor
Bottom line: worth the switch if you are about to do a serious overhaul of a large HA config and want the AI to see the whole folder at once.
5. Continue.dev, best open-source in-editor assistant
Continue.dev is an open-source VS Code and JetBrains extension that plugs into any model, a cloud API, or a local one through Ollama. It offers the same in-editor chat and inline-edit workflow as the paid tools above, but the model choice and hosting are entirely yours, which matters if you want Copilot-style convenience without a subscription or a cloud dependency.
Where it falls short: quality depends heavily on which model you point it at. A local model through Ollama is noticeably weaker at YAML edge cases than GPT-4-class or Claude-class models, so complex templating still benefits from a cloud model behind the same extension.
Pricing:
- Free: fully open source, no subscription required
Platforms: Windows, macOS, Linux
Download: Continue.dev
Bottom line: the pick for anyone who wants an in-editor AI assistant without paying a recurring fee, especially when paired with a capable API key of their own.
6. Ollama with Home Assistant integration, best local and private option
Ollama runs open models like Llama or Qwen entirely on your own hardware, and the community Home Assistant integration lets a locally hosted model answer questions about your config or draft automations without any of your entity names or routines leaving the network. A mid-size model on a spare mini PC or a machine with a modest GPU is enough to draft straightforward triggers and conditions.
Where it falls short: local models lag well behind ChatGPT or Claude on complex YAML, especially nested templates or Jinja logic inside a condition, so treat its output as a rough draft to review rather than a final answer.
Pricing:
- Free: fully open source; the only cost is the hardware it runs on
Platforms: Windows, macOS, Linux
Download: Ollama
Bottom line: the right call for a cloud-averse household that would rather review more carefully than send config data anywhere.
7. Extended OpenAI Conversation, best for piping an LLM directly into Home Assistant
Extended OpenAI Conversation is a HACS integration that connects OpenAI’s API, or any OpenAI-compatible endpoint including a local one, directly into Home Assistant’s conversation agent. Instead of copying generated YAML from a separate chat window, you can ask the assistant inside Home Assistant itself to draft or explain an automation, and it has function-calling access to your actual entities and services.
Where it falls short: setup means installing HACS first, adding a custom integration, and supplying your own API key, which is a longer path than opening a chat tab. It is also not officially maintained by the Home Assistant core team.
Pricing:
- Free: the integration itself is free and open source; you pay only for API usage on whichever model you connect
Platforms: Windows, macOS, Linux (runs as part of a Home Assistant instance)
Download: Extended OpenAI Conversation
Bottom line: the deepest integration on this list, worth the extra setup once you are past drafting occasional automations and want AI generation built into Home Assistant’s own interface.
How to pick the right one
If you have never written a Home Assistant automation by hand, start with ChatGPT: describe what you want in plain language, review the YAML it hands back, and paste it in. If you are comfortable with YAML but slow at it, and your config file has grown large, Claude is worth the subscription for how much of your config it can hold in context at once. Anyone who keeps their Home Assistant config in a git repository should look at GitHub Copilot Chat or Cursor first, since both work directly against the files instead of a separate chat window.
For a privacy-first or cloud-averse setup, Ollama paired with the Home Assistant integration keeps every prompt and every entity name on your own network, and Continue.dev gives you the same local option inside an editor rather than a chat window. If your budget is zero and you already self-host, Continue.dev with Ollama behind it costs nothing beyond the hardware you already run. And if you want AI generation and runtime voice control in the same place rather than a separate chat tool, look at Extended OpenAI Conversation, which puts the assistant inside Home Assistant itself, or check the separate roundup on natural language automation tools for the voice-first side of this.
FAQ
Can ChatGPT write valid Home Assistant YAML? Yes, for most common automation patterns. It handles triggers, conditions, and actions correctly in the majority of cases, but it can invent entity IDs that do not exist in your setup if you do not give it your actual entity list first. Always review the output against your real config before pasting it in.
Is Claude better than ChatGPT for large HA configs? For reading and refactoring an existing, sizeable automations file, yes. Claude’s longer context window lets it hold more of your config in a single conversation, which reduces the chance it suggests something that conflicts with an automation it never saw. For a single short automation, either tool works about equally well.
Do I need a paid plan to use AI with Home Assistant? No. The free tiers of ChatGPT and Claude are enough for occasional automation requests, and Continue.dev paired with Ollama costs nothing at all beyond the hardware it runs on. A paid plan mainly buys higher usage limits and, in some cases, a more capable model.
Can I use a local LLM to write HA automations? Yes, through Ollama and its Home Assistant integration, or through Continue.dev configured to point at a local model instead of a cloud API. Local models are weaker at complex YAML and nested templates than cloud models, so treat their output as a draft that needs review rather than a final answer.
What is the Extended OpenAI Conversation integration? It is a community-built HACS integration that connects an OpenAI API key, or any OpenAI-compatible endpoint, directly into Home Assistant’s own conversation agent. It gives the assistant function-calling access to your real entities and services, so it can draft or explain automations from inside Home Assistant rather than a separate chat window.