Use Claude Code to maintain Home Assistant automations
Adam relied on Claude Code plus an MCP server to inspect Home Assistant, edit automation YAML, and troubleshoot behavior from traces.
- What they did
- Adam kept his Home Assistant automations in YAML files inside a git repository. Claude Code connected into Home Assistant through MCP so it could search for entities, examine automation traces, and reload the setup after edits. Each time, it changed the file, copied it into Home Assistant with scp, triggered a reload, and then committed the update. For the shed motion light, it began by studying similar motion rules, checking for conflicts, and asking clarifying questions before writing anything.
- How it went
- A camera automation that was reacting to home-to-home GPS updates was found and repaired in under two minutes. Another brightness change needed four messages. The shed light logic also saves the previous state of each light, so lights that were already on remain on.
- Tips
- Adam’s skills files describe his conventions and device quirks, which helps Claude Code follow the existing patterns. It is also useful to ask the agent to compare against nearby automations before making live changes.
Try it yourself with Claude Code
I want to manage my Home Assistant automations through Claude Code and an MCP server. Start by finding the entities for [room/device] and checking any related automations or traces. Then draft the YAML for [desired behavior] and explain any possible conflicts or assumptions. Show me the exact change before you do anything irreversible, and wait for my approval before you reload, save, submit, commit, or send anything. If there is a problem after testing, inspect the trace, explain the cause, and propose the next fix. Stop at each approval point.
Fill in the [brackets]. Agents can make mistakes, so review anything before it is sent, paid or deleted.
3 more reports of this
Get 3 agent uses like this every morning
With the day's top AI news. Free, and one click to unsubscribe.
Related agent uses
Use your phone to steer a PC game launch
A writer used Claude Code to handle simple desktop chores and start World of Warcraft from a phone-linked PC.
Build an e-ink fridge shopping list
Claude Code wrote firmware for a fridge-mounted shopping list that syncs with a phone web app and groups items by aisle.
Compare an MRI report with the scan itself
A person used Claude Code to review a shoulder MRI and then compare its read with the doctor’s report.
Fill PDF forms from saved personal details
A developer used Claude Code to complete W-9s from stored details and save finished copies for later reuse.
Turn genetic and lab data into a personal health plan
A developer fed Claude Code genetic, lab, scan, and supplement data, then spent two hours getting a plan tied to those inputs.
Automate LinkedIn job hunting and application drafts
Claude Code used a live Chrome session to locate fitting LinkedIn roles, assemble a shortlist, write letters, and submit applications.