π Home Assistant Assistant
Your Home Assistant setup, understood by AI β grounded in your live entities and the official docs, not guesses.
Skills and a safety hook for Claude Code, GitHub Copilot CLI, and VS Code with GitHub Copilot that help you run your existing Home Assistant installation: ESPHome configs, troubleshooting, read-only config snapshots, a map of your home, and release notes checked against it. It is not for Home Assistant core development.
It builds on two projects you install alongside it: ha-mcp, whose tools let the agent read and change your home, and the Home Assistant best-practices skill, which tells it how to write automations, scripts, scenes, helpers, and dashboards. This plugin covers what they leave out.
Try what the skills make, on a made-up home, in the live demos.
π Contents
- β¨ Features
- π§ How it works
- π§° Prerequisites
- π Set up the Home Assistant MCP server
- π¦ Installation
- β Check that it works
- π Optional: SSH snapshots
- π‘ Usage examples
- π‘ Home map
- π° Release notes
- π Safety and privacy
- π§± Project structure
- π§― Troubleshooting
- π€ Contributing
- π License
β¨ Features
- π§ ESPHome support β device YAML authoring backed by an esphome.io sitemap, with live reads, validation, and flashing through the ESPHome Device Builder.
- π©Ί Troubleshooting playbook β follows the evidence through logs, automation traces, and integration diagnostics before proposing a fix.
- π° Personalized release notes β
/ha-release-noteschecks every release between your version and the newest against your integrations and automations, and gives an upgrade verdict. See it. - π‘ Home map β
/ha-home-mapdraws an interactive map of your areas, devices, and the automations, scripts, and scenes that link them, as one HTML file that works offline. See the demo. - π Config snapshots β optional read-only SSH snapshots of what no MCP tool reads:
configuration.yamland the files it includes,customize.yaml, and Zigbee2MQTT data. - π Read-only SSH guard β a hook that blocks destructive SSH commands against your Home Assistant host, whether they run in Bash or PowerShell.
- π§© Cross-tool plugin β the same skills and hook work in Claude Code, GitHub Copilot CLI, and VS Code.
π§ How it works
flowchart LR
user([You]) --> agent["Your AI agent + skills<br/>Claude Code Β· Copilot CLI Β· VS Code"]
agent -->|"MCP Β· ha-mcp and MCP Server tools"| ha[("Home Assistant")]
agent -->|"follows"| bp["home-assistant-best-practices<br/>skill"]
agent -->|"looks up"| docs["Official docs<br/>home-assistant.io Β· esphome.io"]
agent -->|"reads"| snap["ha-data/ snapshots"]
ha -->|"SSH, read-only Β· optional"| snap
guard{{"SSH read-only guard"}} -.->|"checks every shell command"| agent
ha-mcp and the best-practices skill handle everyday requests: finding entities, and writing or fixing automations, scripts, scenes, helpers, and dashboards. This plugin's skills load when a request reaches past them:
| Skill | What it does |
|---|---|
ha-troubleshooting | Follows the evidence through logs, traces, and integration diagnostics when something fails, and sorts out MCP connection problems |
ha-config-fetch | Refreshes ha-data/ snapshots over SSH for the files no MCP tool reads, when they are older than 24 hours and always before debugging |
ha-release-notes | On demand only (/ha-release-notes): checks every release from your version up to the target against your setup, and saves an HTML and Markdown report with an upgrade verdict |
ha-home-map | On demand only (/ha-home-map): draws your areas, devices, automations, scripts, and scenes as an offline, interactive map |
esphome | Authors ESPHome device YAML with an esphome.io sitemap |
π§° Prerequisites
| You need | For |
|---|---|
| Home Assistant 2026.11 or later with the Model Context Protocol Server integration (the first release with the complete OAuth support browser sign-in relies on: Client ID Metadata Documents, PKCE, and discovery for public clients) | Everything |
| One client: Claude Code, GitHub Copilot CLI, or VS Code with GitHub Copilot | Everything |
| Python 3 | The SSH read-only guard hook, which every client runs |
| ha-mcp, installed as the HA-MCP integration | Recommended: reading and changing automations, scripts, scenes, dashboards, helpers, and integrations, and reading logs, traces, and history |
The home-assistant-best-practices skill | Recommended: writing automations, scripts, scenes, helpers, and dashboards the way Home Assistant recommends; the Installation commands add it |
| A Home Assistant administrator account, and the ESPHome Device Builder add-on for the ESPHome tools | ha-mcp, and the optional extra tool sets for live ESPHome YAMLs and a merged log timeline over MCP |
SSH access to the Home Assistant host through a passwordless host alias named exactly homeassistant in ~/.ssh/config | Optional: snapshots of config files and Zigbee2MQTT data, and your own home map |
| PyYAML or uv | Optional: the home map |
Claude Code runs the hook as python3 on every platform, including Windows. The Copilot clients run it as python3 on Linux/macOS and as python on Windows.
π Set up the Home Assistant MCP server
- In Home Assistant, go to Settings β Devices & services β Add Integration, search for Model Context Protocol Server, and finish the setup flow.
- Go to Settings β Voice assistants β Expose and expose the entities you want the default Device control tools to see. Those tools see only exposed entities; ha-mcp's tools see all of them.
- Note your MCP URL: your Home Assistant URL followed by
/api/mcp, for examplehttps://example.ui.nabu.casa/api/mcp.
All three clients sign in through Home Assistant's own login page in your browser (OAuth), so there is no token to create or copy. Use an HTTPS URL that matches the Internal URL or External URL configured in Home Assistant (Home Assistant Cloud, a reverse proxy, or Home Assistant's own TLS): the Home Assistant docs note that Claude Code only connects to MCP servers over HTTPS.
The integration's options control which tools it exposes and whether it requires an administrator account (on by default). See the integration docs for the details.
Add ha-mcp
ha-mcp gives the agent tools to read and change automations, scripts, scenes, dashboards, helpers, and integrations, and to read logs, traces, and history, for every entity rather than only the exposed ones.
- Install the HA-MCP integration from the Marketplace and add it under Settings β Devices & services, as the ha-mcp README describes.
- In its options, turn on its LLM API (
enable_llm_api). The Model Context Protocol Server integration then serves ha-mcp's tools on the same/api/mcpURL as its own, as long as Expose all AI tools is on or HA-MCP is picked under AI tools (see the next section). - Reconnect your client so it loads the new tools:
/mcpβ Reconnect in Claude Code, or restart the client.
ha-mcp lists its most-used tools directly and finds the rest through ha_search_tools. It has its own read-only mode and per-tool approval settings; see its README.
Optional: extra tool sets
The Model Context Protocol Server integration has two more tool sets of its own. ha-mcp covers most of the Home Assistant set, but the ESPHome Device Builder set is the only way to read, validate, and flash ESPHome YAMLs over MCP:
| Tool set | What the agent gets | Needs in Home Assistant |
|---|---|---|
| Device control | GetLiveContext and the device intents (HassTurnOn, HassLightSet, and so on), for exposed entities only | Nothing beyond the setup above |
| Home Assistant | Logs (Core, Supervisor, and add-ons), long-term statistics, templates, search across entities, automations, and labels, integration status, and any action | An administrator account |
| ESPHome Device Builder | Device YAMLs: list, read, and validate them, and also edit, compile, and flash | The ESPHome Device Builder add-on, and an administrator account |
To get them on the /api/mcp URL the clients use, open the integration's options (the gear next to the main URL):
- Turn on Expose all AI tools, or pick the sets under AI tools. New setups have it on; setups created before the option existed keep it off.
- Sign in as an administrator. With the Home Assistant set on the main URL, an administrator account is always required.
- Optionally turn on Read-only to keep only the tools that change nothing. That also removes the device intents, such as
HassTurnOn. - Reconnect your client so it reloads the tool list:
/mcpβ Reconnect in Claude Code, or restart the client.
Each set also has its own URL under /api/mcp/. Those URLs ignore the options above and are never read-only.
π¦ Installation
Pick your client. All three load the same skills and hook, and add the best-practices skill next to them.
π€ Claude Code
claude plugin marketplace add calexandre/homeassistant-assistant
claude plugin install homeassistant-assistant@homeassistant
claude plugin marketplace add homeassistant-ai/skills
claude plugin install home-assistant-skills@home-assistant-skills
claude mcp add --scope user --transport http homeassistant https://YOUR-HOME-ASSISTANT/api/mcp
claude mcp login homeassistant
claude mcp login opens your browser to sign in to Home Assistant.
π GitHub Copilot CLI
copilot plugin marketplace add calexandre/homeassistant-assistant
copilot plugin install homeassistant-assistant@homeassistant
copilot mcp add --transport http homeassistant https://YOUR-HOME-ASSISTANT/api/mcp
npx skills add homeassistant-ai/skills -g
Copilot CLI signs in to Home Assistant through your browser, like Claude Code. The npx skills installer needs Node.js 22.20 or later.
π₯οΈ VS Code
git clone https://github.com/calexandre/homeassistant-assistant.git
npx skills add homeassistant-ai/skills -g
code homeassistant-assistant
Skills load automatically from .claude/skills/, the best-practices skill from your user folder, and the SSH guard hook from .github/hooks/. Run MCP: Add Server, choose HTTP, enter https://YOUR-HOME-ASSISTANT/api/mcp, use the ID homeassistant, and sign in to Home Assistant when VS Code opens your browser.
β Check that it works
Ask a question only your house can answer:
> Which lights are on right now?
The answer should name your real entities. If the agent says it cannot reach Home Assistant, list your MCP servers with claude mcp list, copilot mcp list, or the MCP: List Servers command in VS Code, then see Troubleshooting.
π Optional: SSH snapshots
ha-mcp reads automations, scripts, scenes, logs, and the registries live, but no MCP tool reads configuration.yaml, the files it includes, customize.yaml, or Zigbee2MQTT's files. With SSH access, the agent pulls read-only snapshots of these into ha-data/ in your working directory (gitignored in this repo), along with the registries and YAML the home map and release notes read, and ESPHome YAMLs and logs for clients without the MCP tools for them.
[!IMPORTANT] SSH access requires a host alias named exactly
homeassistantin~/.ssh/config. The fetch script connects to that name, and the read-only guard only protects commands that target it: under any other alias, snapshots fail and the guard can't block writes to your host.
| Snapshot | Path on the host | Needs |
|---|---|---|
automations, scenes, scripts, configuration, customize YAML | /config | Any SSH add-on |
Every file configuration.yaml includes, such as packages and automation folders (secrets.yaml is always skipped) | /config | Any SSH add-on |
| Area, device, entity, and integration registries, trimmed as they download: no credentials, integration titles, MAC addresses, or serial numbers | /config/.storage | Any SSH add-on |
ESPHome device YAMLs (secrets.yaml is always skipped) | /config/esphome | Any SSH add-on |
Zigbee2MQTT configuration, devices, groups, state.json | /share/zigbee2mqtt | Root, or a user with sudo |
| Core and Supervisor logs, last 12 hours | Docker container logs | Advanced SSH & Web Terminal add-on with Protection mode off |
-
Install an SSH add-on in Home Assistant and add your public key to it. The official Terminal & SSH add-on covers config files and ESPHome YAMLs; the community Advanced SSH & Web Terminal add-on with protection mode off covers everything.
-
Add the
homeassistanthost alias to~/.ssh/config, withHostName,User, andPortset to your Home Assistant host and what your add-on uses:Host homeassistant HostName homeassistant.local User root Port 22 IdentityFile ~/.ssh/id_ed25519 -
Check that it logs in without a password prompt:
ssh homeassistant ls /config -
Ask the agent to "refresh my Home Assistant data", or run the script yourself from a clone of this repo:
.claude/skills/ha-config-fetch/fetch-ha-data.sh
The script reads /config by default. If your add-on mounts the config elsewhere, pass the path: .claude/skills/ha-config-fetch/fetch-ha-data.sh /homeassistant.
π‘ Usage examples
Just ask, in any client. In VS Code, use Chat in Agent mode.
π€ Creating automations
> Create an automation that turns on the living room lights at sunset,
but only if someone is home.
> Turn my kitchen ceiling switch into a scene that also dims the hall lights.
With ha-mcp, the agent writes the automation into Home Assistant once you approve the tool call, following the best-practices skill. Without it, you get the config to paste into the automation editor.
π©Ί Debugging
> My motion sensor automation isn't triggering β help me debug it.
> Why does this template return unknown? {{ states('sensor.temperature') | float }}
The troubleshooting skill reads the logs, the automation's traces, and the integration's diagnostics before proposing a fix.
π Checking your home
> Which battery sensors are below 20%?
> Are any of my automations using deprecated syntax?
π§ ESPHome devices
> Add a BME280 sensor to the hall corridor wall switch over I2C.
For what an upgrade means for your home, see Release notes.
π‘ Home map
/ha-home-map draws your home as one interactive page: each area is a card holding its devices, linked to the automations, scripts, and scenes that trigger or control them. The page is a single HTML file that opens straight from disk, with no server or internet connection.
Try it first: the live demo maps a made-up home with 12 rooms, 166 devices, and 57 automations, right in your browser.
Build your map
The map reads your registries and automation YAML from SSH snapshots, and its graph builder needs PyYAML or uv. Run it in Claude Code, with an optional page title:
/ha-home-map
/ha-home-map Beach house
It runs only when you call it, and then:
- Refreshes
ha-data/over SSH when the snapshot is more than a day old, including every fileconfiguration.yamlincludes. - Saves the map to
.temp/home-map/home-map.html(gitignored). - Replies with a link to the file (on WSL, also a
file://wsl.localhost/β¦address for your Windows browser), counts of what's on the map, and the automations it left off because they touch no device.
Without SSH access, it hands you the demo instead: the plugin ships it already built, so it needs no build and no PyYAML. Once your map exists, ask follow-up questions such as "what turns on the hallway light?": the agent answers from the map's data in .temp/home-map/graph.json.
The page lists your rooms, devices, and routines, so it stays on your machine and the agent shares only its local path. What the agent reads to answer you, its counts and the parts of graph.json a follow-up question needs, reaches your AI provider like any other snapshot; Safety and privacy covers that and the one network request a build makes.
Read the map
| You see | It means |
|---|---|
| Card | An area. Across rooms holds the automations, scripts, and scenes that touch several areas, and No area holds devices without one |
| Round icon | A device, colored by how it connects: Zigbee, Wi-Fi, Z-Wave, and so on |
| Dark square | An automation, script, or scene |
| Dashed line | Triggers: the device starts the automation |
| Solid arrow | Controls: the automation, script, or scene acts on the device |
| Dotted arrow | Runs: an automation or script starts another automation, script, or scene |
Find your way around
- Search by name or entity ID, or press
/to jump to the search box. - Click an item to highlight everything linked to it and open its details: what triggers it, what it controls, and what it runs.
Escclears the selection. - Filter by area, connection, device type, or integration in the sidebar: click a chip to show or hide it, or double-click it to show only that one. Automated only hides devices that no automation touches.
- Zoom with the scroll wheel, a pinch, a double-click, or
+and-; drag or use the arrow keys to pan, and press0to fit the whole home. - Switch to Table for a sortable list, download the current view as a PNG, or switch between light and dark.
π° Release notes
/ha-release-notes tells you what an upgrade means for your home: every release between the version you run and the one you want, checked against your integrations and automations, with a verdict on whether to upgrade.
Try it first: the live demo checks a made-up home's upgrade from 2026.9.3 to 2026.11.0.
Check your upgrade
Run it in Claude Code, optionally with the release you want and the version you run:
/ha-release-notes
/ha-release-notes 2026.11.1
/ha-release-notes 2026.11.1 from 2026.9.3
It runs only when you call it, and then:
- Reads your installed version, registries, and YAML from the SSH snapshots, refreshing them when they are more than a day old.
- Fetches the official release post of every release from your version up to the target (the newest, unless you name one), and matches each highlight, new integration, improvement, breaking change, and patch fix to the integrations and automations that use them.
- Has the agent judge what matched, in its own words, and pick a verdict: β Upgrade, βΉοΈ Upgrade and check, β οΈ Review first, β³ Wait for a patch, or π Hold.
- Saves the report to
ha-release-notes/ha-release-<version>.htmland.md(gitignored), and replies with the changes that affect you, the verdict, and a link to the page.
Without SSH access, it matches the entity domains GetLiveContext shows, says so in the report, and covers only the target release unless you pass from. The build needs PyYAML or uv to read your YAML.
Read the report
The page leads with the verdict, then what needs your action, what you'll notice, the highlights, and the new features worth a look. Only what affects me hides everything else, and each breaking change that doesn't touch your home gets one line with a link to the post. The Markdown copy holds the same sections, with front matter for notes apps.
π Safety and privacy
- Read-only SSH guard. A
PreToolUsehook inspects every Bash and PowerShell command. Commands that reach thehomeassistanthost must match a read-only allowlist; interactive SSH, uploads (scp,sftp,rsync), and everything else are denied. It guards against mistakes; it is not a sandbox. - Changes stay with you. ha-mcp and the extra tool sets can change anything, from editing an automation to flashing an ESPHome device. Your client asks before each MCP tool call, and the skills ask before any tool that changes something. For a hard guarantee, turn on ha-mcp's read-only mode and the Model Context Protocol Server integration's Read-only option.
- What leaves your machine. Anything the agent reads through MCP (entity states, automations, logs, history, ESPHome YAML), and any snapshot the agent reads (automations, logs, Zigbee2MQTT state, the home map's
graph.json, the release notes to-do with your matching automations), are sent to your AI provider as part of the conversation.secrets.yamlis never fetched, and the registries are trimmed before they are saved, so integration credentials never reach the disk. The home map page stays on your machine; building it fetches only area icons it doesn't bundle, by icon name, from the jsdelivr CDN. Release notes fetch only the public release posts, from GitHub and the Home Assistant blog feed, and send nothing about your home. - No tokens to handle. Every client signs in through Home Assistant's own login page, so there is no access token to copy, paste, or leak.
π§± Project structure
.claude-plugin/
βββ plugin.json # Plugin manifest (Claude Code + Copilot CLI): version, skills path
βββ marketplace.json # Marketplace entry used by `plugin marketplace add`
βββ icon.png # Plugin icon
.claude/skills/ # Every skill, in the one folder all three clients read
βββ ha-config-fetch/ # fetch-ha-data.sh (SSH snapshots) and its helpers
βββ ha-home-map/ # /ha-home-map, on demand only: graph builder and page template
βββ ha-release-notes/ # /ha-release-notes, on demand only: release post parser, matcher, and report page
βββ ha-troubleshooting/ # Logs, traces, diagnostics, and MCP connection problems
βββ esphome/ # ESPHome YAML guidance and SITEMAP.md of esphome.io
hooks/hooks.json # SSH read-only guard config for plugin installs
.github/
βββ hooks/ # SSH read-only guard script, its tests, and its config for clones
βββ instructions/ # Markdown rules for docs and generated reports
βββ workflows/tests.yml # CI: runs every test suite on pushes to main and on pull requests
βββ workflows/pages.yml # Publishes demo/assets/ to GitHub Pages, stamped with the plugin version
βββ dependabot.yml # Weekly updates for the GitHub Actions in workflows/
tests/ # Test suites for the skills, one folder per skill, kept out of the skill folders
demo/
βββ demo_home.py # Generates made-up homes for the demos and the tests
βββ release-notes.json # The made-up home's release notes report, the source of its demo page
βββ trim_release_report.py # Trims a judged report into release-notes.json
βββ build.sh # Rebuilds the demo pages; CI fails while a committed page is stale
βββ assets/ # GitHub Pages root: the showcase (index.html), each demo built, and its screenshot
images/ # README logo
AGENTS.md # Instructions for coding agents working on this repo
CONTRIBUTING.md # Tests, version bumps, and commit style for contributors
SECURITY.md # How to report a vulnerability privately
LICENSE # MIT
ha-data/ # Fetched HA snapshots and logs (gitignored)
ha-release-notes/ # Generated release reports (gitignored)
.temp/ # Scratch output (gitignored)
π§― Troubleshooting
The agent can't reach Home Assistant:
- Check the server's status with
claude mcp list,copilot mcp list, or MCP: List Servers in VS Code. - Check that the URL ends in
/api/mcp, uses the right scheme (https://for Claude Code), and opens from this machine. - If sign-in fails or you get
401 Unauthorized, check that the URL matches the Internal URL or External URL configured in Home Assistant, then sign in again (claude mcp login homeassistantin Claude Code). The integration docs' troubleshooting section covers the remaining OAuth cases. - The integration requires an administrator account by default, so signing in as a non-admin user fails. Sign in as an administrator or change that option in the integration.
The agent says a device doesn't exist: ha-mcp's tools see every entity, so check that they're connected (next item). Without ha-mcp, expose the device under Settings β Voice assistants β Expose: the Device control tools see only exposed entities.
ha-mcp, log, statistics, or ESPHome tools are missing: check ha-mcp's LLM API option (Add ha-mcp) and the integration's options and add-ons against Optional: extra tool sets, then reconnect your client. Clients load the tool list when they connect, so new sets appear only after a reconnect.
The plugin doesn't load in Claude Code or Copilot CLI:
claude plugin marketplace update homeassistant
claude plugin list
copilot plugin marketplace update homeassistant
copilot plugin list
From a local clone, validate the manifests with claude plugin validate ..
SSH snapshots fail: run ssh homeassistant ls /config first. If that works but Zigbee2MQTT data or logs are skipped, check the snapshot table for the access each one needs.
Shell commands fail with an SSH guard hook startup error:
Confirm Python is available: run python3 --version for Claude Code on any platform and for Copilot on Linux/macOS, or python --version for Copilot on Windows. On Windows, a python3 or python command that only opens the Microsoft Store is an app execution alias, not an interpreter; install Python or turn the alias off in Settings β Apps β Advanced app settings β App execution aliases. The hook uses separate PowerShell and Bash launchers and inspects both the Bash and PowerShell tools; restart the client after changing hook configuration so it reloads. All Git subcommands, including commit and push, are allowed by this hook; the read-only restrictions apply only to direct SSH/file-transfer commands targeting homeassistant.
π€ Contributing
Questions and ideas are welcome in Discussions; bugs go to Issues. See CONTRIBUTING.md for how to test changes, and SECURITY.md to report a vulnerability privately.

