← 返回
开发者工具 Key 中文

Home Assistant Assist

Control Home Assistant smart home devices using the Assist (Conversation) API. Use this skill when the user wants to control smart home entities - lights, sw...
使用 Assist (对话) API 控制 Home Assistant 智能家居设备。当用户需要控制灯、开关等智能家居实体时,请使用此技能。
developmentcats developmentcats 来源
开发者工具 clawhub v1.1.1 1 版本 99924 Key: 需要
★ 6
Stars
📥 3,825
下载
💾 167
安装
1
版本
#latest

概述

Home Assistant Assist

Control smart home devices by passing natural language to Home Assistant's Assist (Conversation) API. Fire and forget — trust Assist to handle intent parsing, entity resolution, and execution.

When to Use This Skill

Use this skill when the user wants to control or query any smart home device. If it's in Home Assistant, Assist can handle it.

How It Works

Pass the user's request directly to Assist:

curl -s -X POST "$HASS_SERVER/api/conversation/process" \
  -H "Authorization: Bearer $HASS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"text": "USER REQUEST HERE", "language": "en"}'

Trust Assist. It handles:

  • Intent parsing
  • Fuzzy entity name matching
  • Area-aware commands
  • Execution
  • Error responses

Handling Responses

Just relay what Assist says. The response.speech.plain.speech field contains the human-readable result.

  • "Turned on the light" → Success, tell the user
  • "Sorry, I couldn't understand that" → Assist couldn't parse it
  • "Sorry, there are multiple devices called X" → Ambiguous name

Don't over-interpret. If Assist says it worked, it worked. Trust the response.

When Assist Returns an Error

Only if Assist returns an error (response_type: "error"), you can suggest HA-side improvements:

ErrorSuggestion
-------------------
no_intent_match"HA didn't recognize that command"
no_valid_targets"Try checking the entity name in HA, or add an alias"
Multiple devices"There may be duplicate names — consider adding unique aliases in HA"

These are suggestions for improving HA config, not skill failures. The skill did its job — it passed the request to Assist.

Setup

Set environment variables in OpenClaw config:

{
  "env": {
    "HASS_SERVER": "https://your-homeassistant-url",
    "HASS_TOKEN": "your-long-lived-access-token"
  }
}

Generate a token: Home Assistant → Profile → Long-Lived Access Tokens → Create Token

API Reference

Endpoint

POST /api/conversation/process

Note: Use /api/conversation/process, NOT /api/services/conversation/process.

Request

{
  "text": "turn on the kitchen lights",
  "language": "en"
}

Response

{
  "response": {
    "speech": {
      "plain": {"speech": "Turned on the light"}
    },
    "response_type": "action_done",
    "data": {
      "success": [{"name": "Kitchen Light", "id": "light.kitchen"}],
      "failed": []
    }
  }
}

Philosophy

  • Trust Assist — It knows the user's HA setup better than we do
  • Fire and forget — Pass the request, relay the response
  • Don't troubleshoot — If something doesn't work, suggest HA config improvements
  • Keep it simple — One API call, natural language in, natural language out

Links

版本历史

共 1 个版本

  • v1.1.1 当前
    2026-03-28 11:58 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,385 📥 321,017
ai-agent

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,232 📥 268,311
dev-programming

Coder Workspaces

developmentcats
通过 CLI 管理 Coder 工作区和 AI 编程代理任务。支持列出、创建、启停及删除工作区,通过 SSH 连接执行命令,以及使用 Claude Code、Aider 等代理创建和监控 AI 编程任务。
★ 3 📥 5,253