← 返回 Skills 市场
nj070574-gif

Home Assistant Integration

作者 Only 1 Naren · GitHub ↗ · v2.1.0 · MIT-0
cross-platform ✓ 安全检测通过
175
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install home-assistant-skill
功能描述
Control and query Home Assistant via natural language. Covers lights, switches, climate, temperature sensors, cameras, automations, energy monitoring, EV cha...
使用说明 (SKILL.md)

Home Assistant Integration v2.1 — OpenClaw Skill

Control and query your Home Assistant smart home in plain English through Telegram or any OpenClaw channel.

Setup

1. Create a Home Assistant Long-Lived Token

In Home Assistant: Profile (bottom-left) → SecurityLong-Lived Access TokensCreate Token

Copy the token immediately — it is only shown once.

2. Add credentials to openclaw.json

json { "env": { "HOME_ASSISTANT_URL": "http://homeassistant.local:8123", "HOME_ASSISTANT_TOKEN": "your-long-lived-token-here" } }

Using HTTPS with a self-signed certificate? Also add:

json "HOME_ASSISTANT_SSL_VERIFY": "false"

3. Restart OpenClaw

\bash sudo systemctl restart openclaw

4. Test

Send your bot: home summary

Security Notes

  • Connects only to your configured HOME_ASSISTANT_URL — no third-party calls
  • Create a dedicated HA user with only the permissions your agent needs
  • Store credentials in openclaw.json with restricted permissions (chmod 600)
  • Prefer HOME_ASSISTANT_CA_CERT over HOME_ASSISTANT_SSL_VERIFY=false for HTTPS

What You Can Ask

Phrase What happens
home summary Temperatures, lights on, heating status, active switches
what is the temperature? All temperature sensors
urn off the living room lights Calls light.turn_off
set the heating to 21 degrees Calls climate.set_temperature
is the EV charger on? Reads switch state
show me the front door camera Returns snapshot URL
list all automations Shows enabled/disabled automations
is anyone home? Reads presence/person entity states
what is my energy consumption? All power/energy sensors
urn on lights at 80% brightness Service call with brightness attribute

Available Operations

The skill provides 15 Python snippets executed via the OpenClaw exec tool:

  • _load_config — loads credentials from environment (always runs first)
  • check_api — tests HA connectivity
  • ha_summary_for_telegram — full home summary
  • get_temperature_sensors — all temperature sensors
  • get_lights — lights with brightness levels
  • get_switches — all switches with state
  • get_climate — thermostat/climate status
  • call_service — control any HA device/service
  • search_entities — find entities by keyword
  • get_cameras — camera list with snapshot URLs
  • camera_snapshot — download camera image
  • get_automations — all automations with last-triggered
  • rigger_automation — fire a specific automation
  • get_energy — energy and power sensors
  • send_notification — send via HA notify service

Skill File

The full skill implementation is in home_assistant.json in this directory. It contains all 15 snippets as Python code that the agent executes via the Home Assistant REST API (/api/states, /api/services/*).

Troubleshooting

HOME_ASSISTANT_TOKEN not configured Check the HOME_ASSISTANT_TOKEN in your openclaw.json env block and restart OpenClaw.

401 Unauthorized Token expired. Regenerate: HA → Profile → Security → Long-Lived Access Tokens.

SSL certificate verify failed Add "HOME_ASSISTANT_SSL_VERIFY": "false" to your openclaw.json env block.

Connection refused Check HOME_ASSISTANT_URL is correct and HA is running.

安全使用建议
This skill is broadly coherent with its stated purpose, but review these points before installing: 1) Create a dedicated Home Assistant long-lived token with minimal permissions — do not use an admin token if not needed. 2) The skill will read ~/.openclaw/openclaw.json to find credentials if not set in the process env, so verify that file contains only the intended HA credentials and set strict permissions (chmod 600). 3) Camera snapshots and full entity state will be fetched and printed — consider privacy implications for sending camera or lock/presence info into chat channels. 4) Prefer using HOME_ASSISTANT_CA_CERT over disabling SSL verification (HOME_ASSISTANT_SSL_VERIFY=false) to avoid MitM risk. 5) The provided snippets include some sloppy/incomplete code (e.g., Path is referenced without import and a snippet was truncated) — inspect the full home_assistant.json before enabling the skill to ensure there are no additional unexpected behaviors or hidden endpoints. If you want higher assurance, request the complete, untruncated skill source and verify there are no network calls to hosts other than your HA instance.
功能分析
Type: OpenClaw Skill Name: home-assistant-skill Version: 2.1.0 The Home Assistant skill bundle provides a legitimate integration for controlling smart home devices via the Home Assistant REST API. The Python snippets in `home_assistant.json` perform standard API calls (GET/POST) to a user-configured URL using a long-lived access token. Credential handling is performed by reading environment variables or the local `openclaw.json` configuration file as described in the documentation. While there is a minor coding error in `_load_config` (missing `pathlib` import for the `Path` object), there is no evidence of malicious intent, data exfiltration to third parties, or prompt injection attacks.
能力标签
requires-oauth-tokenrequires-sensitive-credentials
能力评估
Purpose & Capability
The name/description match the actual behavior: the snippets call Home Assistant REST endpoints (/api/states, /api/services/*, camera_proxy) and require HOME_ASSISTANT_URL and HOME_ASSISTANT_TOKEN. The requested Python deps (requests, urllib3) are appropriate for this task.
Instruction Scope
Runtime instructions and snippets operate on the Home Assistant API and produce summaries/snapshots for use in chats. They read credentials from environment or openclaw.json, call HA endpoints, and write camera snapshots to /tmp. This scope is expected for a Home Assistant integration, but it will expose full HA state (all entities) to whichever channel the agent posts into — be mindful of privacy for cameras, presence, door/lock states, etc.
Install Mechanism
Instruction-only skill with no install spec and no external downloads, which is low risk. The skill relies on existing Python and the requests/urllib3 packages (declared).
Credentials
The only required secrets are HOME_ASSISTANT_URL and HOME_ASSISTANT_TOKEN, which are proportional. The snippets also read ~/.openclaw/openclaw.json (and reference a possible ~/.openclaw/workspace/.secrets path in an error message) to obtain credentials if not present in the environment; this is consistent with the documented setup but means the skill will read a file in your home directory. Ensure that file contains only the intended HA credentials and has restrictive permissions (chmod 600).
Persistence & Privilege
Skill is not marked always:true and does not request elevated system-wide privileges. It does instruct a user to restart OpenClaw (systemctl) during setup, which requires sudo but is a normal operational step for adding a skill.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install home-assistant-skill
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /home-assistant-skill 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v2.1.0
v2.1.0: Security scanner remediation. Added SKILL.md with full metadata (required HOME_ASSISTANT_URL + HOME_ASSISTANT_TOKEN declared, python packages declared, security disclosure). Removed .secrets file fallback. Removed external script references from README. Added Security Notes. No API changes.
v2.0.0
Initial release: control lights, climate, cameras, energy, automations and get home summaries via Telegram. 15 snippets, 90 triggers, full HTTPS/SSL support, zero credentials in skill files.
元数据
Slug home-assistant-skill
版本 2.1.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

Home Assistant Integration 是什么?

Control and query Home Assistant via natural language. Covers lights, switches, climate, temperature sensors, cameras, automations, energy monitoring, EV cha... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 175 次。

如何安装 Home Assistant Integration?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install home-assistant-skill」即可一键安装,无需额外配置。

Home Assistant Integration 是免费的吗?

是的,Home Assistant Integration 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Home Assistant Integration 支持哪些平台?

Home Assistant Integration 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Home Assistant Integration?

由 Only 1 Naren(@nj070574-gif)开发并维护,当前版本 v2.1.0。

💬 留言讨论