● 社群
Coolver
⚡ 即開即用
home-assistant-vibecode-agent
作者 Coolver · Coolver/home-assistant-vibecode-agent
從 IDE 管理 Home Assistant — 使用自然語言建立自動化、設計儀表板和部署配置。
home-assistant-vibecode-agent 是一款具有 MCP 伺服器整合的 Home Assistant 插件,可讓 AI IDE(Claude Code、Cursor、VS Code)自主管理智慧家庭配置。 它可以創建自動化、設計 Lovelace 儀表板、安裝 HACS 元件、管理附加元件並驗證配置 - 所有這些都可以透過基於 git 的自動備份和一鍵回滾來實現。
為什麼要用
核心特性
- 自然語言自動化創建和調試
- Lovelace 儀表板設計和人工智慧主題定制
- 基於 Git 的自動備份,具有有意義的提交訊息和回滾
- 用於安裝 1000 多個社區組件的 HACS 集成
- 完整的 HA REST API 和 WebSocket 存取以及設定驗證
即時演示
實際使用效果
home-assistant-vibecode-agent-2.replay
▶ 就緒
使用場景
實戰用法: home-assistant-vibecode-agent
何時使用: 您想要在家中實現一些自動化操作,但不想手動編寫 YAML。
前置條件
- 安裝了附加元件的家庭助理 — 新增儲存庫 https://github.com/coolver/home-assistant-vibecode-agent 並安裝
- MCP 用戶端已配置 — 配置 Claude Code 或 Cursor 以連接到附加元件的 MCP 端點
步驟
-
描述您的自動化
創建自動化:當我到家時(手機 GPS 進入家庭區域),打開客廳燈,將其亮度設置為 70%,然後開始在廚房揚聲器上播放我的 Spotify 播放清單。✓ 已複製
→ 自動化 YAML 產生和驗證
-
部署和測試
→ 自動化部署,建立備份並測試結果
結果: 根據簡單的英語描述建立的工作家庭助理自動化。
注意事項
- 實體名稱與您所描述的不符 — 請代理先列出可用的實體,以便您可以引用正確的名稱
何時使用: 您想要一個美觀、實用的儀表板,但發現手動編輯器有限制。
前置條件
- Vibecode 代理程式正在運行並已連接 — 安裝附加元件並配置 MCP 用戶端
步驟
-
描述儀表板
為我的臥室設計一個儀表板:顯示感測器的溫度/濕度、帶有亮度滑桿的燈光控制、Sonos 的媒體播放器卡以及過去 24 小時的溫度圖表。✓ 已複製
→ 使用所有請求的卡片產生 Lovelace YAML
-
迭代設計
將媒體播放器移至頂部並添加與我的臥室顏色相匹配的深色主題。✓ 已複製
→ 使用重新排序的卡片和自訂主題更新了儀表板
結果: 部署到 Home Assistant 的精美 Lovelace 儀表板。
注意事項
- 定制卡需要安裝 HACS — 在新增自訂卡之前要求代理程式安裝所需的 HACS 元件
組合
與其他 MCP 搭配,撬動十倍槓桿
將 Home Assistant 配置匯出並備份到本機文件
將我的所有自動化和儀表板配置匯出到 ~/ha-backup/ 以進行版本控制。✓ 已複製
成本與限制
運行它的成本
- API 配額
- N/A — 與本地 Home Assistant 實例通信
- 每次呼叫 Token 數
- 每次操作 200–1000 個代幣
- 費用
- 免費 — 開源附加元件
- 提示
- 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.
- This add-on has full access to your Home Assistant API. It can control all devices, modify configurations, and install components.
- Always verify automation YAML before deploying — bad automations can trigger devices unexpectedly.
- Git backup provides rollback, but test changes on non-critical devices first.
故障排查
常見錯誤與修復
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 directly | You want direct API access without the MCP layer | More control but no AI-assisted YAML generation or validation |