Using Claude Code to manage your Home Assistant config is pretty amazing

I like your rule file. I have my own github of a Claude skill that produces amazing results. Unlike the nay-sayers here, I’m not a coder but using LLM has allowed me to do many automations/scripts/sensors that I would’ve never been able to do and made my home much more efficient.

I’ll be doing a stare and compare against your rules to see if I missed anything.

1 Like

…If you’re collecting rulesets… :slight_smile:

Slightly different angle of attack. Can work in connection with everything else listed but designed to pass the high bar of an old school it director who took too many arrows to the knee from bad devops. :slight_smile:

3 Likes

Thank you! I’m publishing a new version of mine that proactively addresses several of your FG. Quite a few of them were already in my learnings, but some great ones that slipped through my experience so far. (source credited both in changelog and in 3rd party attributions in my license file)

1 Like

I just tried claude code out to fix a problem after switching from a fritzbox to a mesh network and my shelly devices stopped working.

I setup ssh access locally, and then I gave claude code a prompt from my own terminal and it did a bunch of searching of the network to find the devices on their new IPs and propose a fix which I approved and it updated HA via ssh, then verified they were accessible. What worked really well was that it could look through lots of data and use cli tools to inspect the local network.

Probably would have taken me 1-2 hours trying to make sense of it. After it was done I asked it to talk me through what the problem was so I could understand it for myself.

Advice if you want to try this:

  1. Opus 4.6 is a game changer vs previous models. It’s far more intelligent and the free models or models from 1-2 years ago are completely different in terms of autonomy. There is a world of difference between copy and paste from free chatgpt and this.
  2. Understand what the potential risk is. I have used claude code thousands of times in my work and it’s never gone wrong, but I’m also aware that prompt injection is a genuine threat and that claude can decide to make changes you don’t want.
  3. Watch the output. You need to understand what it’s doing to use it well, what it can do, what it can’t.
  4. Give good instructions. The better you describe your problem, the better the result.
1 Like

I had no prior YAML experience, but code review was part of my career — understanding requirements guides evaluating structure and logic. Review section by section as code comes out.

A few “why is this here?” moments early on led me to create a simple rules file for Claude to read before each session: do these things, stop doing these others. That meant more time on requirements, no code written without my approval, and far fewer unprompted confirmations and scrolling non-answers that use resources.

Rules evolved as confidence grew. Sessions now fall into three query types:

  1. Requirements/Design — discuss alternative approaches, output is decisions and refined requirements only
  2. Build — specific requirements in, YAML out
    3.PM/Tactical — review the work list, show progress in a table, plan what fits in this session or even this convo before tokens or session time runs out today

There is a lot of anger in these comments, and it is understandable.

I spent 25 years building my development skills, learning languages, logic and syntax. If someone wanted a computer to do something, they told me what they wanted, and I was the one who had to translate that into precise instructions in one of several programming languages. One comma in the wrong place could break everything, and finding it could take hours.

The other day I was doing a Tesco shop online while the dog was licking my face and stopping me from using the keyboard properly. I thought how useful it would be to do the shop by voice while still looking at the screen.

Tesco used to have a feature where you could type a simple list like “carrots, soup, chicken, soap”, hit start, and it would take you through each item one by one. You could browse the results, add something, click next item, and continue. It was really handy. They removed it.

In a couple of hours, using Antigravity, I built a Chrome extension that let me dictate a shopping list and control the process by voice. I could say things like “start search”, “scroll down”, “add 4 tins of Tesco chicken soup to the cart”, “add 4 of the third item”, “search next item on list”, “remove last item from cart”, or “change quantity of last item to 2”. I could also go off list, search for something else like Marmite, add it, then return to the original list without losing my place. Tesco’s old feature could not even do that.

In a couple of hours, I had built something that worked exactly how I wanted. It was not for anyone else. It was just for me, and it worked.

That was the moment I realised how much had changed. The thing I loved doing, the hard-earned technical skill, suddenly felt far less valuable. There will be a transition period, but a lot of the frustration, challenge and satisfaction of solving those problems has gone.

Tesco also used to have an IFTTT skill for Alexa that could add items to your cart. It was awful, almost funny. You would ask for Brasso and it might add Bra Soap. They probably spent millions and months building something hardly anyone used before pulling it.

With AI, I described what I wanted, sent it back with feedback when things were wrong, and spoke to it the way a client or project manager might speak to me. When a pop-up overlay blocked the cart total, I just said “make it collapsible and draggable”. Ten seconds later it was fixed. The code was neatly written, fully commented, committed to Git, and all I had to do was reload and test it. Now, with GPT-5.4, it can even reload and test changes itself, then fix what is still broken.

I always expand the thinking section. Watching it work things out is incredible and terrifying.

Seriously, if you still think AI is just a fancy autocomplete then look at the blog introducing GPT 5.4. They tell it to build a theme park simulation game, repeatedly test it until it works, with simulated people, rides, music, challanges etc. And it does.

The speed this is all happening is very scary, and at time I feel very angry that people don’t need me to do the thing I loved doing (writing code) anymore. I honestly don’t know what I am going to do for the rest of my life, I developed web stuff, I loved doing it and was expecting to do it until I retired. I enjoyed hearing “how do you know all this stuff?”, “aren’t you clever”, yes I did know a lot and yes it was clever (i am very humble honest, but praise is always nice to hear) it’s nice to feel valued.

Everyone in my position is trying to pivot, the work that used to require a team of 20 working a couple of months, now takes three people a week.

Really feels like starting my worklife again as a teenager except now I’m nearly 50. I’m good with computers maybe I can do something with that… oh yeah

:sob:

1 Like

The whole discussion is very biased.
On one hand there are those that worship LLM and use it for everything.
On the other hand there are those that despise LLM and consider the very thought of using it as evil.

Neither of those groups is right.

It’s completely insane to use LLM and trust the output blindly.
It is equally insane to call it evil and reject it fully.

The truth is in between.
It’s a tool.
If used as a tool, it’s fine and can be helpful.
And like almost every tool, it can cause damage if used in the wrong way.

2 Likes

I’m no way against “AI” per se. It’s about the broader context and where this is all heading:

  1. absurd cost of LLMs compared to the benefits (and who are the real beneficiaries)
  2. ordinary people trading their skills and jobs for trinkets; these skills, knowledge, and experience are about to be captured by algorithms owned by large corporations
  3. mass surveillance and autonomous weapons
  4. “OpenAI” my ass
1 Like

Understandable and first, it helps to separate a few things that often get lumped together. “AI”, “LLMs”, and “large corporations” get used interchangeably in these conversations, but they are ABSOLUTELY NOT the same thing and local iron DOES exist.

  1. Cost
    Cost is relative, and new technologies are always expensive at the beginning. Early DVD players were hundreds of dollars, adjusted for inflation that makes early DVD players THOUSANDS of dollars in comparison while you can go pick one up at a dollar store for 19 bucks today - if you can even find one anymore, I hear Sony is starting to roll back on BluRay production too. The same thing is happening here. You cannot judge the value of a tech by current economics. Early electricity was insanely expensive too. (Yes, I ABSOLUTELY just compared AI to a foundational utility - if you don’t believe it will be I have news and a bunch of history and economics books for you.)

Yes, running four GPUs to generate a bedtime story is absurd. But the same hardware — or something in the price range of a small motorcycle — can run a private system that handles things like knowledge management, automation, maintenance planning, or even a small dev-ops style workflow in a home lab. Once the setup work is done, it runs extremely fast. In that context the economics start to look very different. The value comes from how well the developer or engineer extracts productivity from it. Pay price of small motorcycle for effectively permanent inventory management (ERP) safety control and 24x7 butler concierge services tuned to your preferences? I think yes. (If you’re thinking we’re just turning on a light you need to reframe your thought model. Yes, it’s an ULTRA expensive light switch - but a VERY cheap personal assistant.)

  1. Large corporations
    You don’t actually have to trade your life to a large corporation to benefit from this technology. But you do have to understand the boundaries of the tools and where the trade-offs are.

We’ve been having that conversation in this community for years with things like Amazon and Google home devices. The question is always the same: when are you gaining productivity, and when are you becoming the product? LLMs are just the newest version of that discussion. Look up a device called a DGX spark. Yes, it’s expensive - but it effectively means OAI GPT4-5 quality inference at home. (Yes literally it can run GPT-OSS120b flawlessly, that is OAI’s open weights Omni 4 class model. And you’re not married to them.)

  1. Surveillance / weapons
    Those are real policy concerns, but they’re not what’s being discussed in this thread. The topic here is using Claude (or not using it) to help manage Home Assistant code. I’m pretty sure this is the fast track to meeting a moderator… :wink: So, let’s skip this one, OK??

  2. “OpenAI”
    At the end of the day, nobody here actually knows which provider another person or person’s pants is using. It might be OpenAI, Anthropic, a local model, or something else entirely. For many of us the point is simply the tool itself.

Some people will choose not to use any of this technology, and that’s completely fine. But historically the people who ignore new computing tools eventually end up in the same position as people today who avoid computers or smartphones or the web entirely. Do-able but It’s a tough life.

There’s a funny Star Trek scene (IV - the one with the whales) where ‘Captain’ Scott (‘Scotty’) tries to talk to a computer mouse because he doesn’t understand that these ‘quaint’ humans haven’t discovered voice interfaces yet. But Scotty - HAS NEVER LIVED IN AN ERA where he couldn’t talk to his computers… That’s a real gap for him… (and a great scene.)

Kids growing up today will never experience a world where you can’t just talk to a computer and have it do something useful AND WILL COME TO EXPECT IT. Don’t believe me - watch a 3-yr old with an iPad for 10 minutes…

Because of that, some of us experiment. We try to understand where the real value is and where the limits actually are. Right now, the most practical use is simple: use AI agents to eliminate grunt work. That’s what they are consistently good at. For me it’s paramount we (the community) are doing this work safety - cause there’s a WHOLE lotta ways it goes sideways. (For instance, Yolo-ing a vanilla OpenClaw against a running HA install isnt safe. Needs a LOT of work before it’s ok for normal humans. It’s also not my place to tell you not to - just do it as safely as possible.)

For this discussion specifically, the question is much narrower: whether using Claude to assist with Home Assistant code is useful or not. :slight_smile:

For that I submit every line of code I’ve pushed against Zenos in the last 72 hrs… I rebased the core codeset including the indexer and file tools that took me 9 months and thousands of hours to write. Every line went through the equivalent of an architectural review, a code draft, a review of that draft by an independent teammate, authoring, pushed to a fork and tested against a live system and then merged back in ONLY after it passed both a code hygiene scan AND a full UAT signoff - WITH a disposition report and next actions.

(Yes, each of those roles are a separate agent on various local and cloud models, and why I name them - to keep the minions straight… Veronica has architect grounding, Cait is a lead dev with specialized HA knowledge, Nyx is the tester and thinks like a hacker and operator… Vera is code safety and checks, doubles as the admin for the HALMark footgun list. My role in the circus is lead architect and final code review. Veronicas job is to walk me through the changes so I can go/no-go.)

…after all that and only had one real bug to fix at the end - and the entire codebase was re-documented to match the pushes so docs don’t drift.

So yeah, it’s totally about the broader context but we all need to open our eyes to what we (humans with agency) have to be in the age of AI assisted knowledge work.

Become the boss of your own team of one human or let the team drive you - your choice.

4 Likes

Nathan :slight_smile: I understand (roughly) everything you’re writing about. I also understand (and share) the enthusiasm and delight generated by new technology.

And again on a broader perspective: even if we adopt an optimistic view about progress leading to a better day after tomorrow, we probably don’t want our tomorrow to be too close an iteration of the horrors of the early industrial era. This is, of course, a metaphor; I hope my poor English hasn’t made it incomprehensible.

Coming to the end of this offtopic: somehow I felt compelled to explain that objections to “AI” may stem from more than just fear of losing one’s job!

1 Like