← 返回 Skills 市场
liverock

Smart Home Assistant

作者 Peter Lum · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
85
总下载
1
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install smart-home-assistant
功能描述
Monitor and analyze Home Assistant energy consumption. Use when the user asks about power usage, energy monitoring, consumption by room/area, or wants to gen...
安全使用建议
This skill appears to do what it says (read Home Assistant, analyze energy usage, and produce draft automations), but there are two practical inconsistencies you should address before installing or running it: - Missing dependency/install information: The code imports httpx and yaml (PyYAML) but the registry/install metadata only declares python3 and provides no install script. Ensure the runtime environment has httpx and PyYAML installed (or ask the publisher to include an install spec). Without them the skill will fail or someone may attempt to install dependencies ad-hoc. - Undeclared credential requirement: The skill expects a long-lived Home Assistant token (HA_TOKEN referenced in skill.yaml and SKILL.md) but the registry metadata does not advertise any required env vars or primary credential. Treat the HA_TOKEN as sensitive: provide a scoped/limited token if possible, use a local/private HA endpoint, and rotate or revoke the token after testing. Review the generated automation JSON carefully before applying it in Home Assistant. Additional practical checks: - Confirm the HA URL you supply is only reachable by systems you trust (local network vs public internet). - Review the code (included) yourself to verify there are no exfiltration calls to external endpoints — the code only calls the configured HA URL; no other network destinations are present. - Ask the publisher to fix metadata (declare HA_TOKEN) and provide an explicit install/requirements file (requirements.txt or install spec) so the runtime behavior is predictable. If the above fixes are made (declare env/credentials and add dependency install instructions), the skill would be coherent and appropriate for the stated purpose. Until then the metadata/install mismatches make this risky to deploy without extra verification.
功能分析
Type: OpenClaw Skill Name: smart-home-assistant Version: 1.0.0 The smart-home-assistant skill is a well-structured tool designed to analyze Home Assistant energy data. It follows its stated purpose of fetching entity states via the Home Assistant REST API, normalizing power units, and generating summaries or automation drafts. The code uses safe practices such as yaml.safe_load and environment variable resolution for sensitive tokens, and it lacks any indicators of data exfiltration, unauthorized execution, or malicious prompt injection.
能力标签
requires-oauth-token
能力评估
Purpose & Capability
Name/description, SKILL.md, and the included Python modules all align: the skill fetches states/registries from Home Assistant, analyzes power usage, groups by area, and produces summaries, tables, and draft automation JSON. The requested config paths (home_assistant.url, home_assistant.token) match the stated purpose.
Instruction Scope
Runtime instructions and code remain within the stated read-only energy-analysis scope: they fetch /api/states, device and area registries, filter power entities, analyze and format outputs. The SKILL.md explicitly disallows direct device control and the code does not call HA services to change state. It does request a long-lived token to query Home Assistant, which is necessary for the functionality.
Install Mechanism
There is no install spec despite including Python code that imports third-party libraries (httpx and yaml). The registry only requires python3, but does not ensure httpx and PyYAML are available — this is a missing/incorrect install descriptor and will cause runtime failures or hidden ad-hoc installs depending on the host environment. No remote downloads or obviously malicious install URLs are present, but the lack of declared dependencies is a practical risk and incoherence.
Credentials
The skill requires a Home Assistant long-lived access token (referenced in skill.yaml as ${HA_TOKEN} and resolved by config._resolve_env_vars), but the top-level registry metadata lists no required env vars or primary credential. This mismatch means the skill silently requires a sensitive credential that is not advertised in metadata. The request is otherwise proportionate to the purpose (HA token is needed to read states/registries) — the problem is the metadata omission.
Persistence & Privilege
The skill is not always-enabled and does not write to other skills or system-wide settings. It performs network requests only to the configured Home Assistant URL and returns draft automation payloads for manual review. No elevated persistence or system modifications are requested.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install smart-home-assistant
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /smart-home-assistant 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Smart Home & Automation An OpenClaw skill for real-time energy monitoring and automation generation with Home Assistant. Fetches live power data, analyzes consumption by room, identifies your highest energy consumers, and generates ready-to-use Home Assistant automations. What It Does Fetches live entity states from your Home Assistant REST API Analyzes per-area and per-device power consumption Outputs three selectable formats: Summary — a concise text insight (2-3 sentences) Table — a markdown comparison of Area | Device | Consumption Automation — a JSON payload for HA's automation.create service xample Output Summary Laundry is drawing 2,200W — 57% of your total 3,842W. The Dryer is the single highest consumer at 2,200W. No anomalies detected. Table Area Device Consumption (W) Laundry Dryer 2,200.0 Kitchen Fridge 180.5 Unassigned Smart Plug 3 45.0 Automation JSON [ { "alias": "High Power Alert - Laundry", "trigger": { "platform": "numeric_state", "entity_id": "sensor.dryer_power", "above": 2000 }, "condition": [ { "condition": "time", "after": "06:00:00", "before": "22:00:00" }, { "condition": "state", "entity_id": "binary_sensor.laundry_occupancy", "state": "off" } ], "action": { "service": "switch.turn_off", "target": { "entity_id": "switch.dryer" } } } ] Configuration All settings live in smart_home/skill.yaml: home_assistant: url: "http://homeassistant.local:8123" token: "${HA_TOKEN}" # Resolved from environment variable units: power: ["W", "kW"] energy: ["Wh", "kWh"] rules: - name: "High Power Shutoff" threshold_watts: 2000 # Devices above this trigger automations time_window: after: "06:00" # Active window start before: "22:00" # Active window end require_occupancy: "off" # Trigger when room is unoccupied action: "turn_off" # turn_off | turn_on | notify outputs: default: ["summary", "table"] # Formats produced when none specified How Automation Rules Work The automation output generates HA automations only for devices exceeding threshold_watts. Each automation includes: Power trigger — numeric_state above the configured threshold Time condition — only active during the configured time_window Occupancy condition — auto-detected: if binary_sensor.<area>_occupancy exists in your entities, the condition is added. If no occupancy sensor is found for that area, the condition is omitted. Switch entity IDs are derived from the sensor entity by convention: sensor.dryer_power becomes switch.dryer.
元数据
Slug smart-home-assistant
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Smart Home Assistant 是什么?

Monitor and analyze Home Assistant energy consumption. Use when the user asks about power usage, energy monitoring, consumption by room/area, or wants to gen... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 85 次。

如何安装 Smart Home Assistant?

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

Smart Home Assistant 是免费的吗?

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

Smart Home Assistant 支持哪些平台?

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

谁开发了 Smart Home Assistant?

由 Peter Lum(@liverock)开发并维护,当前版本 v1.0.0。

💬 留言讨论