I created an add-on that integrates Claude Code (Anthropic’s AI assistant) directly into Home Assistant. With it, you can create automations, debug configurations, and manage your smart home using natural language through a browser-based terminal.
What does it do?
Web terminal integrated in the HA sidebar
Create automations by describing what you want in plain English
Access your entities - Claude can see your sensors, lights, climate, etc.
Edit YAML configurations directly
Debug automations that aren’t working
Persistent sessions - don’t lose your work if you close the browser
Usage examples
claude “List all my automations”
claude “Create an automation to turn off lights when I leave home”
claude “Why isn’t my motion sensor automation working?”
claude “Show the state of all temperature sensors”
How does it work?
The add-on uses hass-mcp (Model Context Protocol) which allows Claude to:
Query entity states
Control devices
List available services
Access the entire Home Assistant API
Requirements
Home Assistant OS or Supervised
Anthropic account (authentication is done directly in the terminal)
I have a VERY LARGE setup with close to 10k entities and alomst a 500k lines of lovelace and 100k lines of automations.
I use Claude in the webui every day in my system but it has a very limited context window. As a result it hallucinates more often than not at the end of a context window, which requires a human eye over the code it creates.
the authentication is such a pain. I don’t know if it’s the plug-in or claude code itself but the authentication link is so long that it’s split over multiple lines and only the first line is seen as a link so it doesn’t load the correct page. somehow selecting text and and copying it is nearly impossible. Selected text doesn’t stay highlighted so I can’t copy it. It shows to press “c” to copy but that doesn’t work. Right click opens up the menu in claude but also the right click window from macos, making the claude menu unreachable.
Robson, this is brilliant. It has made a huge change for me, especially for diagnosing issues. Love it. I used Claude separately before, and was good for coding YAML, but this is much better for admin stuff, plus the coding changes.
Same experience here. I even tried an OCR reader to grab the auth link text but that didn’t work either. Seems like the developer may have abandoned it since he hasn’t been responding. I just stumbled onto this that looks promising as an alternative: Home Assistant MCP Setup Wizard.
I have Claude Code installed and it’s been working fine, but I’m getting “Auto-update failed” in the bottom right corner off the Claude Code window. Is anyone else getting this?
Awesome tool, this makes so fun to use and develop. A small downsize or improvement would be the “auto” accept edits on. This is not working from my side even with the toggle oder the force comand. Still asking to read this or that.
Gave it a try and like it. I used the web version of Claude for development of my HA system and the split screen web view is better for detailed code reviews and challenges to what was done… but it is extremely tedious for project files that have to be horsed back and forth, samba, etc and soon out of date.
But once the system was released, the maintenance and updates are really easy with this app including direct access to the necessary files and git commits.
The first task on either web or HA Claude version is setting the ground rules and expectations for what it does and doesn’t do. Based on my banging in to session limits and losing some work on the web Claude, I had it build a file of design / build decisions… brought that over and had it reviewed and added to CLAUDE.md. And Claude is trained not to touch files until a definitive Yes is given.
Also, like Studio Code Server, I stop the process after every session.
Yes… I completed a “great circle” on the file copying topic:
Started with Claude in a browser and pasting results into studio code server
That got tedious so I setup a samba share to HA for creating new yamls
That was ok until I was in ‘production’ and needed to make different small changes in different yamls… that got tedious, especially version control with Claude’s project files
Loaded Claude in HA and it having access and ability to push to git without copying is great… but…
Code reviews in the terminal view of Claude HA are brutal… back to using studio code server and samba for that part
I’m planning to create new yamls in Claude web and copy them to HA and use HA Claude for maintenance and updates.