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.
  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.

6 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.

1 Like

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.

Is it using a claude code subscription or API ?

I m thinking using it and give up mammouth