Been running Home Assistant for many years and the yaml configs have gotten… extensive. Recently started using Claude Code directly on my HA OS instance, and now I can just casually modify or improve my automation without having to spend all the time to dig into how/what and clicking through the UI or editing files.
My setup: I SSH into HA, run Claude Code from the terminal, and use Cursor as my editor when I want to look at files. But most of the time I’m just talking to Claude in the terminal.
Here’s the setup if you want to clone it: GitHub - danbuhler/claude-code-ha: Use Claude code in Home Assistant to manage configuration and automations. It has scripts to deal with the reinstall after updates, and helper tools so Claude can control your HA instance via the API.
The other day I plugged in a new light in the living room. Instead of manually digging through the UI, finding the entity, figuring out which automations need updating, etc., I just said:
“I plugged a new light in the living room, can you find it and add it to the necessary automations? Please make suggestions on how it could fit into scenes too.”
And it found it, asked me to confirm by turning it off and on(!!), and then put it in the right room/zone, named it correctly, added it to the standard automations, and suggested some color schemes.
Other things I’ve used it for:
- “The motion sensor in the hallway is too sensitive at night, can you add a condition so it only triggers above 20% brightness after 11pm?”
- “Create a new automation that turns on the porch light when the garage door opens after sunset”
- “Something’s wrong with my thermostat automations, they’re not firing - can you check the logs and fix it?”
I put together some helper CLI tools that let Claude actually query entity states, call services, manage the device registry, etc. Makes it way more useful than just editing yaml blindly.
Works with Claude Code, and the tools themselves can easily be adapted for Cursor or Codex too. The CLAUDE.md file gives it context about your setup and the available commands. It’s fairly minimal right now and I can see this expanding into a mega-prompt or skills for doing everything else.
What’s everyone else doing?
BTW GitHub - danbuhler/claude-code-ha: Use Claude code in Home Assistant to manage configuration and automations. is version 1, submit PR’s if you have better ideas, issues if it’s broken.

