I’ve spent an unhealthy amount of time tweaking my Home Assistant setup, and Claude Code has assisted me through a lot of it. But Home Assistant and Claude Code are two separate programs. Claude can generate YAML for that fancy dashboard you want, but you’re still going to have to put that in Home Assistant before you can even start testing it.
Thankfully, that problem can be solved by handing Claude your Home Assistant long-lived access token, and suddenly Claude could inspect my setup, call actions, create automations, and work on changes destined for my actual home.
One pasted token turns Claude from advisor into houseguest
Read states, call services, and skip the copy-paste step
Home Assistant’s API lets authenticated clients read entity states and call services that control devices. In my setup, that means Claude can check sensors, switch lights and plugs, adjust brightness and colors, toggle camera helpers, send notifications, and even control my 3D printers.
That’s a much bigger task than simply generating configuration snippets and dashboard YAMLs. An incorrect answer can quickly become an incorrection, and I won’t have the chance to catch it while copying code. That said, there are boundaries as access still follows Home Assistant’s user permissions.
A token also isn’t the same as an SSH password, and direct SSH access requires separate credentials. Pushing code needs an available deployment route, not merely a token. My experiment simply combined Home Assistant access with Claude Code’s ability to work on the configuration, rather than magically turning an API credential into unrestricted server access.
A camera dashboard turned into a server autopsy
A driver mismatch, a stale integration, and one camera I gave up on
One of the first projects I took on with the new access was creating a Frigate camera dashboard during a major Home Assistant dashboard overhaul I was doing. It might sound like a straightforward interface design task, but the dashboard wasn’t the biggest problem.
An Nvidia driver mismatch had silently knocked out Frigate on my server. There were also authentication problems, a stale Home Assistant integration, and video-decoding issues with the camera I was using. What was meant to be a simple arrangement of camera cards quickly became a debugging session across several layers of the whole setup.
And this was where the access felt a lot more valuable than I had initially imagined. Instead of repeatedly asking for instructions and copy-pasting results between windows, I could keep the troubleshooting in the same conversation. The project also involved deciding what wasn’t worth keeping, and the camera eventually came off my main dashboard.
It wasn’t a clean, one-shot task. There were broken components, revisions, and compromises. But all that did was make the result more convincing.
Claude also learned to split the rent
Three dashboard designs and a flatmate-proof electricity tracker
For my primary dashboard, I started off by asking Claude to give me design options given the entities I had on my previous dashboards. Claude gave me three designs, and I ended up mixing and matching design elements from all three to arrive at the final result. After that, all I had to do was tell Claude to push the finalized design to Home Assistant and since it already had access to all my entities, it created my main office dashboard and a touch-friendly mobile version in a single prompt.
Then my AC power monitoring dashboard became a household rent calculator. It splits rent, househelp, water, and electricity charges between me and my flatmates using smart plugs to monitor AC power consumption. It factors in each person’s AC usage from the previous month, and also includes a payment confirmation button, overdue warnings tied to the rent due date, and a monthly electricity tracking screen with month-end estimates given the current pace of consumption.
This to me is far more interesting than asking an assistant to turn on a light. I was describing household rules and having them translated into an interface connected to my own data. Deployment and verification are still different jobs though, and Claude needed additional inputs to fix issues like card heights, backgrounds, and touch handling on mobile devices.
When a typo can leave the AC running
Away-mode automations and a retry script for a stubborn compressor
Now that Claude can access my Home Assistant instance, I can also create automations by simply describing an idea in natural language rather than fiddling with YAML. My latest automation switches off air conditioning, lights, and inactive 3D printers when my phone leaves my home Wi-Fi network and GPS also reports that I’m away. I did have to correct Home Assistant’s wrongly positioned home zone, but all it took to make this automation was a single prompt.
Claude also helped me troubleshoot and figure out the automation for my climate control unit. My office AC unit has a quirk where even though the AC might be on from the plug, the onboard control unit doesn’t necessarily turn the AC on. This requires a power cycle to get the AC to actually run. This behavior rendered a simple automation useless, as simply toggling the office AC on wasn’t enough to actually run it.
I ended up writing a verify-and-retry script with Claude’s assistance that turns the plug on, watches actual power draw to know when the compressor kicks in, and power cycles if the compressor doesn’t kick in. The script runs five attempts, ten seconds apart, with a five-second cooldown period. Only once the script confirms real power draw does the snowflake on the display turn on. There’s also a separate safety-off automation that forces both ACs off if you disarm the system or if the device drops offline for more than 45 seconds to ensure nothing is left running unsupervised.
The part I wouldn’t copy from me
A 10-year credential in an AI chat is a long time to be wrong
Now I wouldn’t recommend copying my token-pasting approach. Home Assistant’s long-lived tokens can remain valid for 10 years. That’s an uncomfortable lifetime for a credential casually dropped into a conversation with an AI agent, especially one that isn’t running on your hardware.
If you want to connect the two platforms together, I’d use a dedicated credential, restrict deployment access, back up configurations, and revoke the token once the job is done. I’d also recommend requiring approval for major changes, which is easy to do with Claude Code’s explicit permission rules.
Keep the assistant, tighten the leash
Useful, a bit uncomfortable, and now on a shorter lease
I’m not disconnecting Claude from my smart home because this experiment has turned out to be too useful to dismiss, albeit a little uncomfortable as far as privacy is concerned. It has helped turn unfinished ideas and broken configurations into things I could actually use. But there’s a difference between trusting an AI assistant to write an automation and trusting it to deploy changes that affect physical devices.
That distinction needs to stay visible, even if everything seems to work. Going forward, I’ve tightened permissions, the approvals are more deliberate, and started verifying Claude’s code before it gets pushed to Home Assistant. The real scare wasn’t that Claude Code took over my home, it’s how easy it became to let it do much more.