Overview
Connect Claude to Home Assistant's MCP server in read-only mode, describe the lighting you want in the evening and at night, and paste the automation YAML it drafts into Home Assistant's editor yourself after checking it.
Problem or Objective
More in Home and Devices
AI Agents and Models
Tools and Integrations
- Tools
- Home Assistant · Claude Desktop
- Prerequisites
- Home Assistant with the Model Context Protocol server integration, reachable from the internet for Claude's cloud connection. The Home Assistant tool set and the main URL by default require an administrator account.
How It Works
In Home Assistant, set up the Model Context Protocol server integration and turn on its read-only option so the AI app can see the state of your home but not change anything. Add the server URL as a custom connector in Claude or Claude Desktop. Open your current lighting automation, choose Edit in YAML and copy it into the chat. Describe what you want instead, for example softer lamps instead of bright ceiling LEDs after sunset and a short, dim path light for night-time movement that switches itself off. Ask Claude to check which light and sensor entities exist and to draft the new automation as YAML, explaining each trigger, condition and action. Disable the old automation rather than deleting it, paste the new YAML into a new automation in the YAML editor, save it and test it in the evening and at night before relying on it.
Implementation Workflow
Steps assembled from the agents, tools and prompt of this entry. Adapt them to your own setup.
- Choose the agentSet up Home Assistant.
- Connect the toolsConnect the tools this workflow relies on: Home Assistant, Claude Desktop.
- Check the prerequisitesHome Assistant with the Model Context Protocol server integration, reachable from the internet for Claude's cloud connection. The Home Assistant tool set and the main URL by default require an administrator account.
- Gather your detailsCollect what the prompt asks for: Your current automation YAML, Rooms involved, What should happen in the evening, What should happen at night.
- Run the starter promptPaste the starter prompt below into Home Assistant and adapt it to your case.
- Check against the documentationCompare what you get with the documentation at home-assistant.io before you rely on it.
Practical Starter Prompt: Draft a gentler lighting automation
Fill the fields to adapt the prompt. Empty fields stay as visible [placeholders].
Here is my current lighting automation in YAML: [Your current automation YAML]. Use the Home Assistant connector only to read which light and sensor entities exist in [Rooms involved]; do not control any device. Draft a replacement automation in YAML that [What should happen in the evening] and, at night, [What should happen at night]. Explain each trigger, condition and action, and list what I should test. I will paste and save it myself.Disable the old automation instead of deleting it, paste the draft into a new automation, save it yourself and test it at night before relying on it.
Expected Results and Benefits
This is a suggested workflow, not a reported result. The points below are what the cited documentation says the tools can do.
This is a suggested workflow, not a reported outcome. Home Assistant's MCP page says an AI app such as Claude can use the tools you allow to see the current state of your home, offers a read-only option, and says Claude asks for permission before using a tool unless you always allow it. The automation editor page documents pasting YAML into an automation and disabling one. No cited page reports how well a drafted lighting rule works in a real home.
Limitations and Considerations
Keep the connector read-only so nothing changes until you paste and save the rule yourself, and keep the old automation disabled as a fallback. Test night-time behaviour in person, including what happens if a sensor fails, and keep a wall switch or manual control that works without the automation. Claude connects to the MCP server from the cloud, also from Claude Desktop, so your Home Assistant instance must be reachable from the internet; secure that access. Results depend on your setup and were not independently reproduced by Top 200 Repos.
GitHub Repositories
AI Agent Repository
Source code of the agent that does the work.
Official Website
The official site of the main tool or project in this use case.
Visit Website (opens in a new tab)home-assistant.io
Sources
- Model Context Protocol - Home Assistant (opens in a new tab)
Project documentation · home-assistant.io · Undated · Source checked 26 Nov 2026, 23:34 UTC
What this source supports
- If the main URL only exposes AI tools that are marked as not changing anything, such as getting the current state of your home.
- Claude connects to your MCP server from the cloud, also when you use Claude Desktop. Your Home Assistant instance must be accessible from the internet.
- Claude asks for your permission before it uses an AI tool, unless you choose to always allow it.
- Automation editors - Home Assistant (opens in a new tab)
Project documentation · home-assistant.io · Undated · Source checked 27 Nov 2026, 11:22 UTC
What this source supports
- The automation editors let you create and edit automations. You can do it directly from the Home Assistant user interface without writing any YAML in the visual editor, or in the YAML editor.
- Disable : Turns off the automation, so it doesn't react to its triggers. To turn it on again, select Enable .