Use Claude AI in Home Assistant Studio

Sometimes you have to configure stuff in Home Assistant the "painful" way: Working with Yaml-Files instead of using the UI. Therefore Studio Code Server is the first choice for most of us. But Yaml isn't fun. Yaml in hass.io especially isn't fun.

But there is ai for the rescue. AI isn't always the solution, but working with ugly configuration formats is exactly where it is good at. So let's add claude to the Studio Code Server

By Ole Albers

Published on February 4, 2026, 6:17 pm

Category: others

Tag: homeassistant, homeautomation, ai, claude

Studio Code Server

I assume you already have installed the Studio Code Server. If you haven't: It is a simple Add-On. Just follow the official instructions: https://github.com/hassio-addons/addon-vscode/blob/main/vscode/DOCS.md

Studio Code Server will then be installed as a docker container. (Don't worry. No need to know anything about docker. This works in the background)

Preparing

Claude needs NodeJs which isn't in the studio code server docker. But don't worry, this is easy to solve. You could connect to the docker and install the required packages using app-get. But while this works this has two disadvantages. First it is a bit more complicated if you are not at home with Linux Systems and most important: Any update of the Addon would kill NodeJs and you would have to do this all over again.

Thankfully the Add-On devs thought of an easy way to do that for you. Just go to Settings - Add-Ons - Studio Code Server. There go to Configuration and in the "packages" enter "npm" and then "nodejs". Do not enter both at the time. Each one of them by enter. After that there should be two bubbles on top:

Setup Page

If you prefer editing in yaml, here is your content:

packages:
  - nodejs
  - npm
init_commands: []

Save and restart the addon. Don't be alarmed if this takes a LONG time. There will have big packages to be downloaded and installed into that container. This will take minutes even on a fast machine and especially if using a Raspberry Pi.

Adding Claude

Install Addon Now you can switch to the code server. Select Extensions on the left side, enter "Claude" into the search and install "Claude Code for VS Code". After that you should have that typical "Claude Star" on the top right corner. You will be greeted with the authentication method. Select the one that matches your account. (Most likely Claude.ai Subscription)

Account selection from Claude

If after using the Login clicking "Open" does not work because you get redirected to a local url use the url instead that is shown in the textbox:

Continue in Browser

Just copy paste that url manually and paste the returning code into Studio Code.

Using Claude

Now you can open Claude using the star and let him do the work

Screenshot of Claude analyzing the configuration.yaml

That is it. Now you can use claude in Home Assistant Config Files