Fixing a broken Home Assistant button with Claude via MCP

Claude reads Home Assistant traces and rewrites a broken button automation using a ZHA event trigger, with a hash-guarded write loop.

Used for
Everyday life
Skill needed
Low code
Shown in video
Partial demo
Summary based on
Transcript
Hand-Me-Down HomelabWatch on YouTube

Claude Code as My Smart Home Co-Pilot: Debugging Home Assistant with MCP

Published Oct 28, 20268:24334 views0 likes

Key moments

  • 2:09Read-only mode cuts tools from 77 to 40
  • 3:14Trace-based debugging of porch lights
  • 4:52Bedroom button fix proposed
  • 5:08Write with hash and read-back

What they made

Bedroom button automation rewritten to a ZHA event trigger on the permanent hardware address and confirmed by reading back the live config.

4:36

How they did it

  1. AI1:23

    Claude connects to Home Assistant through the HA-MCP server with a dedicated long-lived token, starting in read-only mode.

    Stated in video · HA-MCP
  2. AI3:14

    Claude reads the execution trace for the porch lights and identifies that the light sensor was unavailable, failing a condition.

    Stated in video · HA-MCP
  3. AI4:52

    For the repaired bedroom button, Claude proposes a ZHA event trigger keyed to the button's permanent hardware address instead of the internal device ID.

    Stated in video · HA-MCP
  4. AI5:08

    Claude listens on the event bus while the user presses the button and learns it sends the word 'toggle'.

    Stated in video · HA-MCP
  5. Human5:08

    User approves the proposed YAML change.

    Stated in video
  6. AI5:08

    Claude writes the change with the config hash and reads the live configuration back to confirm it saved.

    Stated in video · HA-MCP

What you can reuse

  • Start AI access to a smart home in read-only mode for diagnostics before enabling writes.
  • Use execution traces to find why an automation failed rather than guessing.
  • Guard writes with a config hash and read back the live config to confirm changes.

Trade-offs

  • Requires a long-lived access token and MCP server setup.
  • The creator recommends weeks of read-only use before enabling writes.
  • The extended OpenAI conversation bridge cannot validate a private CA, so it uses plain HTTP with an API key behind a firewall rule.

AI-generated case summaries can contain mistakes. Report an error

More cases like this: Run Home Assistant with AI

Related cases

Automate a smart home

Revive a 2019 Android TV with Claude Code

A creator used Claude Code over Wi-Fi to de-bloat his old Android TV and build a custom ad-free home screen, approving each risky step…

Claude Code111.2K views