Claude Code for Home Assistant - AI Assistant directly in your HA!

Hey everyone!

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)

Installation

  1. Add the repository: GitHub - robsonfelix/robsonfelix-hass-addons: Home Assistant add-ons by Robson Felix. Includes Claude Code - run Anthropic's AI coding assistant directly in Home Assistant to create automations and manage your smart home. · GitHub
  2. Install the “Claude Code” add-on
  3. Start it and open the web UI
  4. Authenticate with your Anthropic account
  5. Done! Start using it

Supported architectures

amd64, aarch64, armv7, armhf, i386


Any questions or suggestions, just comment!

Repository: GitHub - robsonfelix/robsonfelix-hass-addons: Home Assistant add-ons by Robson Felix. Includes Claude Code - run Anthropic's AI coding assistant directly in Home Assistant to create automations and manage your smart home. · GitHub

13 Likes

Is there any functionality to make it read-only?

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.

If read only - i will give this a try.

2 Likes

Authentication link provides this error:

Invalid OAuth Request

Missing scope parameter

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.

I started using this and it is a game chnager. You can control what it does or does not do for you, which is very nice.

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.

1 Like

Is it using a claude code subscription or API ?

I m thinking using it and give up mammouth

looks like either - sub or API.

What worked for me was zooming all the way out (ctrl+scroll down) until the auth link was one line, its then clickable and works as intended:)

4 Likes

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?
Screenshot 2026-02-17 at 9.55.57 PM

I reported this to the developer and apparently it is fixed. I need to confirm.

Looks like the latest version is 1.2.62 which is the version I am running.

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.

THANK YOU! This was infuriating me - your solution is simple but effective :+1:

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.

Thanks @robsonfelix!

I very much like that it explicitly asks what it intends to run/change.
That’s exactly the way an assistant like this should work.

I would prefer to have a version working with Mistral but for now I’m fine with Claude.

However, what is not working at all for me is copying anything out of the session.
Also pasting into the session seems to be not working for me.

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 :crazy_face::rofl:
  • I’m planning to create new yamls in Claude web and copy them to HA and use HA Claude for maintenance and updates.

Ok. The Zoom tip is great. But copying the return code is not possible. You can type a number but you can’t paste the code. sorry

This issue has been addressed by developer as part of GitHub Issue: Unable to work out how to get the Auth Key · Issue #4 · robsonfelix/robsonfelix-hass-addons · GitHub

He has updated README to reflect: Authenticating Claude Code (first launch)

TLDR what worked for me was:

hold Ctrl+Shift while selecting the URL with your mouse to copy it, then paste it into your browser’s address bar.