← Back to Skills Marketplace
ricanwarfare

HA Skill

by ricanwarfare · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
84
Downloads
0
Stars
1
Active Installs
1
Versions
Install in OpenClaw
/install ha-skill
Description
Control Home Assistant entities via REST API. Use when the user asks to control lights, climate, switches, or other HA entities. Supports climate (thermostat...
README (SKILL.md)

Home Assistant Skill

Control your Home Assistant instance via REST API. Supports climate control, lights, switches, and sensor queries.

Purpose

This skill provides read and write access to your Home Assistant entities:

  • Climate: Set temperature, HVAC mode, query current state
  • Lights: Turn on/off, set brightness, color
  • Switches: Toggle on/off
  • Sensors: Query current values
  • Services: Call any HA service

Setup

Credentials are stored in ~/.openclaw/credentials/homeassistant.json:

{
  "url": "http://192.168.2.82:8123",
  "token": "LONG_LIVED_ACCESS_TOKEN"
}

To generate a long-lived access token:

  1. Open Home Assistant → Profile (bottom left)
  2. Scroll to "Long-Lived Access Tokens"
  3. Click "Create Token"
  4. Name it "clawd" and copy the token

Commands

All commands use the HA REST API. Output is human-readable by default, add json for raw output.

Climate Control

Set thermostat temperature and mode:

# Set temperature (auto-selects cool/heat based on setpoint vs current)
bash scripts/climate.sh set \x3Centity_id> \x3Ctemperature>

# Set specific mode (cool, heat, auto, off)
bash scripts/climate.sh mode \x3Centity_id> \x3Cmode>

# Get current climate state
bash scripts/climate.sh status \x3Centity_id>
bash scripts/climate.sh status \x3Centity_id> json

Examples:

# Set to 73°F cooling
bash scripts/climate.sh set climate.living_room 73 cool

# Turn off thermostat
bash scripts/climate.sh mode climate.living_room off

# Check current temperature
bash scripts/climate.sh status climate.living_room

List Entities

Find entity IDs for climate, lights, switches:

# List all climate entities
bash scripts/entities.sh climate

# List all light entities
bash scripts/entities.sh light

# List all switch entities
bash scripts/entities.sh switch

# List all entities of a domain
bash scripts/entities.sh all

Light Control

# Turn on
bash scripts/light.sh on light.living_room

# Turn off
bash scripts/light.sh off light.living_room

# Set brightness (0-255)
bash scripts/light.sh brightness light.living_room 128

# Set color (RGB)
bash scripts/light.sh color light.living_room 255 0 0

# Get state
bash scripts/light.sh status light.living_room

Switch Control

# Toggle switch
bash scripts/switch.sh toggle switch.bedroom_fan

# Turn on/off
bash scripts/switch.sh on switch.bedroom_fan
bash scripts/switch.sh off switch.bedroom_fan

Sensor Query

# Get sensor value
bash scripts/sensor.sh get sensor.temperature_outside
bash scripts/sensor.sh get sensor.humidity_living_room json

Call Service

Direct service call for advanced use:

# Generic service call
bash scripts/service.sh call \x3Cdomain> \x3Cservice> \x3Centity_id> '[{"key": "value"}]'

# Example: Set temperature via climate.set_temperature
bash scripts/service.sh call climate set_temperature climate.living_room '{"temperature": 73}'

Entity Discovery

If you don't know the entity ID:

# Find all climate entities
bash scripts/entities.sh climate

# Find entities by name (fuzzy search)
bash scripts/entities.sh search thermostat
bash scripts/entities.sh search temperature

Common Workflows

  1. "Make it cold" / "Turn on AC" → Find climate entity → Set to cool mode at desired temp
  2. "Turn off the lights" → List light entities → Turn off specific or all
  3. "What's the temperature?" → Query temperature sensor
  4. "Set thermostat to 73" → Set climate entity to 73°F

Error Handling

If the command fails:

  • Check HA is reachable: curl -s http://192.168.2.82:8123
  • Verify token is valid (regenerate if needed)
  • Confirm entity ID exists: bash scripts/entities.sh climate

Notes

  • HA URL: http://192.168.2.82:8123 (from MEMORY.md)
  • All calls use long-lived access token (no OAuth refresh needed)
  • Climate mode mappings: cool, heat, auto, off, heat_cool
  • Temperature unit follows HA configuration (°F for US)

Reference

Usage Guidance
This skill appears to implement Home Assistant REST control and will read a long‑lived access token from ~/.openclaw/credentials/homeassistant.json and then call your HA API. Before installing or enabling it: 1) inspect or create the credentials file yourself (do not paste tokens into untrusted places) and be aware the token grants full control per HA permissions — treat it like a password and rotate it if needed; 2) note mismatches: the SKILL.md references scripts/service.sh which is missing, and climate.sh uses 'bc' but required binaries list only curl and jq — the package may be incomplete or poorly maintained; 3) ask the publisher for a homepage or source repo and for corrected metadata (declare config path and required binaries) or prefer a skill from a trusted source; 4) if you proceed, run in a safe environment (or on a non-critical HA instance) and limit token scope where possible. If the publisher provides an updated package (includes service.sh, declares the credentials file in metadata, and adds 'bc' to required binaries), my confidence that the package is coherent would increase.
Capability Analysis
Type: OpenClaw Skill Name: ha-skill Version: 1.0.0 The Home Assistant skill provides functional integration for controlling smart home devices but contains significant security vulnerabilities in its implementation. Specifically, scripts/light.sh and scripts/switch.sh use manual string concatenation and sed to construct JSON payloads for API calls rather than using jq, which creates a risk of injection if entity IDs or parameters are maliciously crafted. While the behavior is consistent with the stated purpose, these vulnerabilities in input handling and JSON construction meet the threshold for a suspicious classification.
Capability Tags
requires-oauth-token
Capability Assessment
Purpose & Capability
Name/description align with the included scripts: the skill uses curl + jq to call the Home Assistant REST API and implements climate, light, switch, and sensor actions, which is coherent with the claimed purpose. However, the SKILL/README expect credentials in ~/.openclaw/credentials/homeassistant.json but the registry metadata declares no required config paths or credentials — that's an omission/inconsistency.
Instruction Scope
Runtime instructions and the scripts read a long-lived HA access token from ~/.openclaw/credentials/homeassistant.json and make API calls to the configured URL. Reading that credentials file is within the skill's stated purpose (it needs a token), but the file path is not declared in the registry metadata. The SKILL.md also documents a scripts/service.sh helper and shows examples using it, but no scripts/service.sh exists in the package — a mismatch that could break functionality or indicate sloppy packaging.
Install Mechanism
No install spec (instruction-only) so nothing will be downloaded/executed at install time — lower risk. However the package includes shell scripts that will run locally when invoked; there is no automated installer but the presence of code files means review before use is prudent.
Credentials
The skill requests no environment variables in metadata but all scripts read a credentials file containing a long‑lived HA access token. That credential access is necessary for the stated purpose, but the registry should have declared the config path/credential requirement. Additionally, climate.sh uses bc for numeric comparison but 'bc' is not listed in required binaries — a missing dependency.
Persistence & Privilege
always is false and there is no install process that requests persistent system-wide privileges. The skill will only run when invoked and uses the user's credentials file; autonomous invocation is allowed (default) but not combined here with other high-privilege flags.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install ha-skill
  3. After installation, invoke the skill by name or use /ha-skill
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Renamed from clawd-homeassistant
Metadata
Slug ha-skill
Version 1.0.0
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 1
Frequently Asked Questions

What is HA Skill?

Control Home Assistant entities via REST API. Use when the user asks to control lights, climate, switches, or other HA entities. Supports climate (thermostat... It is an AI Agent Skill for Claude Code / OpenClaw, with 84 downloads so far.

How do I install HA Skill?

Run "/install ha-skill" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is HA Skill free?

Yes, HA Skill is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does HA Skill support?

HA Skill is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created HA Skill?

It is built and maintained by ricanwarfare (@ricanwarfare); the current version is v1.0.0.

💬 Comments