/ 目錄 / 演練場 / home-assistant-vibecode-agent
● 社群 Coolver ⚡ 即開即用

home-assistant-vibecode-agent

作者 Coolver · Coolver/home-assistant-vibecode-agent

Manage Home Assistant from your IDE — create automations, design dashboards, and deploy configs using natural language.

home-assistant-vibecode-agent is a Home Assistant add-on with MCP server integration that lets AI IDEs (Claude Code, Cursor, VS Code) autonomously manage smart home configurations. It can create automations, design Lovelace dashboards, install HACS components, manage add-ons, and validate configurations — all with git-based automatic backups and one-click rollback.

為什麼要用

核心特性

即時演示

實際使用效果

home-assistant-vibecode-agent-2.replay ▶ 就緒
0/0

安裝

選擇你的客戶端

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "home-assistant-vibecode-agent-2": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/Coolver/home-assistant-vibecode-agent"
      ]
    }
  }
}

開啟 Claude Desktop → Settings → Developer → Edit Config。儲存後重啟應用。

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "home-assistant-vibecode-agent-2": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/Coolver/home-assistant-vibecode-agent"
      ]
    }
  }
}

Cursor 使用與 Claude Desktop 相同的 mcpServers 格式。專案級設定優先於全域。

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "home-assistant-vibecode-agent-2": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/Coolver/home-assistant-vibecode-agent"
      ]
    }
  }
}

點擊 Cline 側欄中的 MCP Servers 圖示,然後選 "Edit Configuration"。

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "home-assistant-vibecode-agent-2": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/Coolver/home-assistant-vibecode-agent"
      ]
    }
  }
}

格式與 Claude Desktop 相同。重啟 Windsurf 生效。

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "home-assistant-vibecode-agent-2",
      "command": "TODO",
      "args": [
        "See README: https://github.com/Coolver/home-assistant-vibecode-agent"
      ]
    }
  ]
}

Continue 使用伺服器物件陣列,而非映射。

~/.config/zed/settings.json
{
  "context_servers": {
    "home-assistant-vibecode-agent-2": {
      "command": {
        "path": "TODO",
        "args": [
          "See README: https://github.com/Coolver/home-assistant-vibecode-agent"
        ]
      }
    }
  }
}

加入 context_servers。Zed 儲存後熱重載。

claude mcp add home-assistant-vibecode-agent-2 -- TODO 'See README: https://github.com/Coolver/home-assistant-vibecode-agent'

一行命令搞定。用 claude mcp list 驗證,claude mcp remove 移除。

使用場景

實戰用法: home-assistant-vibecode-agent

How to create a Home Assistant automation with natural language

👤 Smart home enthusiasts who prefer describing what they want over writing YAML ⏱ ~10 min beginner

何時使用: You want to automate something in your home but don't want to write YAML manually.

前置條件
  • Home Assistant with the add-on installed — Add repository https://github.com/coolver/home-assistant-vibecode-agent and install
  • MCP client configured — Configure Claude Code or Cursor to connect to the add-on's MCP endpoint
步驟
  1. Describe your automation
    Create an automation: when I arrive home (phone GPS enters home zone), turn on the living room lights, set them to 70% brightness, and start playing my Spotify playlist on the kitchen speaker.✓ 已複製
    → Automation YAML generated and validated
  2. Deploy and test
    Deploy this automation and trigger a test run.✓ 已複製
    → Automation deployed with backup created and test results

結果: A working Home Assistant automation created from a plain English description.

注意事項
  • Entity names don't match what you described — Ask the agent to list available entities first so you can reference the correct names

Design a custom Lovelace dashboard with AI

👤 Home Assistant users who want better dashboards without learning Lovelace YAML ⏱ ~20 min intermediate

何時使用: You want a beautiful, functional dashboard but find the manual editor limiting.

前置條件
  • Vibecode agent running and connected — Install add-on and configure MCP client
步驟
  1. Describe the dashboard
    Design a dashboard for my bedroom: show temperature/humidity from the sensor, light controls with brightness sliders, a media player card for the Sonos, and a graph of temperature over the last 24 hours.✓ 已複製
    → Lovelace YAML generated with all requested cards
  2. Iterate on design
    Move the media player to the top and add a dark theme that matches my bedroom colors.✓ 已複製
    → Updated dashboard with reordered cards and custom theme

結果: A polished Lovelace dashboard deployed to Home Assistant.

注意事項
  • Custom cards require HACS installation — Ask the agent to install required HACS components before adding custom cards

組合

與其他 MCP 搭配,撬動十倍槓桿

home-assistant-vibecode-agent-2 + filesystem

Export and backup Home Assistant configurations to local files

Export all my automations and dashboard configs to ~/ha-backup/ for version control.✓ 已複製

工具

此 MCP 暴露的能力

工具輸入參數何時呼叫成本
create_automation description or YAML Create or modify Home Assistant automations 0
update_dashboard dashboard config Create or update Lovelace dashboards 0
list_entities domain?: str List available Home Assistant entities 0
call_service domain: str, service: str, data?: obj Call a Home Assistant service (turn on lights, play media, etc.) 0
install_hacs component: str Install a HACS community component 0

成本與限制

運行它的成本

API 配額
N/A — communicates with local Home Assistant instance
每次呼叫 Token 數
200–1000 tokens per operation
費用
Free — open source add-on
提示
List entities first to reduce trial-and-error when creating automations.

安全

權限、密鑰、影響範圍

最小權限: Home Assistant long-lived access token
憑證儲存: HA access token configured in the add-on settings
資料出站: Communicates with your local Home Assistant instance only. HACS downloads from GitHub.

故障排查

常見錯誤與修復

Add-on can't connect to Home Assistant

Verify the long-lived access token is correct and hasn't expired. Check the add-on logs for connection errors.

驗證: Check Home Assistant → Settings → Add-ons for the agent's status
Automation validation fails

The generated YAML may reference entities that don't exist. List entities first to verify names.

驗證: list_entities to see all available entity IDs
HACS component not installing

Ensure HACS itself is installed in Home Assistant first. Check that the component name is correct.

驗證: Verify HACS is accessible from Home Assistant sidebar

替代方案

home-assistant-vibecode-agent 對比其他方案

替代方案何時用它替代權衡
Home Assistant REST API directlyYou want direct API access without the MCP layerMore control but no AI-assisted YAML generation or validation

更多

資源

📖 閱讀 GitHub 上的官方 README

🐙 查看未解決的 issue

🔍 瀏覽全部 400+ MCP 伺服器和 Skills