搜索

PythonReactSEOPDF
OpenClaw

homeassistant-skill

Control Home Assistant devices and automations via REST API. 25 entity domains including lights, climate, locks, presence, weather, calendars, notifications, scripts, and more. Use when the user asks about their smart home, devices, or automations.

anotb0 来源安装数☆ 0 仓库 Stars

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

SkillHub CLI

skillhub install anotb/homeassistant-skill

打开来源仓库,查看说明和兼容环境后,按来源提供的命令或步骤安装。

将来源链接提供给你的 Agent,让它先读取说明、核对依赖,并向你说明将执行的安装步骤。

查看来源 ↗使用指南

技能说明

Home Assistant Skill

Control smart home devices via the Home Assistant REST API.

Setup

Set environment variables:

  • HA_URL — Your Home Assistant URL (e.g., http://10.0.0.10:8123)
  • HA_TOKEN — Long-lived access token (create in HA → Profile → Long-Lived Access Tokens)

Safety Rules

Always confirm with the user before performing these actions:

  • Locks — locking or unlocking any lock
  • Alarm panels — arming or disarming
  • Garage doors — opening or closing (cover.* with device_class: garage)
  • Security automations — disabling automations related to security or safety
  • Covers — opening or closing covers that control physical access (gates, barriers)

Never act on security-sensitive devices without explicit user confirmation.

Entity Discovery

List all entities
curl -s "$HA_URL/api/states" -H "Authorization: Bearer $HA_TOKEN" \
  | jq -r '.[].entity_id' | sort
List entities by domain
# Switches
curl -s "$HA_URL/api/states" -H "Authorization: Bearer $HA_TOKEN" \
  | jq -r '.[] | select(.entity_id | startswith("switch.")) | "\(.entity_id): \(.state)"'

# Lights
curl -s "$HA_URL/api/states" -H "Authorization: Bearer $HA_TOKEN" \
  | jq -r '.[] | select(.entity_id | startswith("light.")) | "\(.entity_id): \(.state)"'

# Sensors
curl -s "$HA_URL/api/states" -H "Authorization: Bearer $HA_TOKEN" \
  | jq -r '.[] | select(.entity_id | startswith("sensor.")) | "\(.entity_id): \(.state) \(.attributes.unit_of_measurement // "")"'

Replace the domain prefix (switch., light., sensor., etc.) to discover entities in any domain.

Get single entity state
curl -s "$HA_URL/api/states/ENTITY_ID" -H "Authorization: Bearer $HA_TOKEN"
Area & Floor Discovery

Use the template API to query areas, floors, and labels.

# List all areas
curl -s -X POST "$HA_URL/api/template" \
  -H "Authorization: Bearer $HA_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"template": "{{...

来源信息

Source
github
Repository
openclaw/skills
Path
skills/anotb/homeassistant-skill
Version
—
Commit
a743d3f8f3b31801059b0e3cc528970ba0b9d51a
分类来源
rules
状态
active
可见性
public

这些信息来自收录时的来源分析,可能滞后;使用前请核对最新来源文件。

README

Home Assistant Skill

An AI agent skill for controlling Home Assistant devices and automations through natural language. 25 entity domains including lights, climate, locks, presence, weather, calendars, notifications, and more — all via the HA REST API.

Works with Claude Code, OpenClaw, Cursor, and any tool supporting the SKILL.md standard.

ClawHub License: MIT

Part of unsol.dev

Prerequisites

  • Home Assistant instance with API access
  • curl and jq installed

Installation

Claude Code
git clone https://github.com/anotb/homeassistant-skill.git ~/.claude/skills/homeassistant-skill
OpenClaw (via ClawdHub)
clawhub install homeassistant-skill
Cursor / Other

Clone to your agent's skill directory.

Configuration

  1. Create a long-lived access token in Home Assistant: Profile → Long-Lived Access Tokens
  2. Set environment variables:
export HA_URL=http://10.0.0.10:8123
export HA_TOKEN=your-long-lived-access-token

What You Can Do

Domain Actions
Switches Turn on, off, toggle
Lights On/off, brightness, color, color temp
Scenes Activate scenes
Scripts List, run, run with variables
Automations Trigger, enable, disable
Climate Set temperature, HVAC mode
Covers Open, close, set position (blinds, garage)
Locks Lock, unlock (with safety confirmation)
Fans On/off, speed
Media players Play, pause, volume
Vacuum Start, return to dock
Alarm Arm, disarm (with safety confirmation)
Notifications Send to mobile devices, list targets
Person / Presence Who is home, device loca...

来源内容

SKILL.md
# Home Assistant Skill

Control smart home devices via the Home Assistant REST API.

## Setup

Set environment variables:
- `HA_URL` — Your Home Assistant URL (e.g., `http://10.0.0.10:8123`)
- `HA_TOKEN` — Long-lived access token (create in HA → Profile → Long-Lived Access Tokens)

## Safety Rules

**Always confirm with the user before performing these actions:**
- **Locks** — locking or unlocking any lock
- **Alarm panels** — arming or disarming
- **Garage doors** — opening or closing (`cover.*` with `device_class: garage`)
- **Security automations** — disabling automations related to security or safety
- **Covers** — opening or closing covers that control physical access (gates, barriers)

Never act on security-sensitive devices without explicit user confirmation.

## Entity Discovery

### List all entities

```bash
curl -s "$HA_URL/api/states" -H "Authorization: Bearer $HA_TOKEN" \
  | jq -r '.[].entity_id' | sort
```

### List entities by domain

```bash
# Switches
curl -s "$HA_URL/api/states" -H "Authorization: Bearer $HA_TOKEN" \
  | jq -r '.[] | select(.entity_id | startswith("switch.")) | "\(.entity_id): \(.state)"'

# Lights
curl -s "$HA_URL/api/states" -H "Authorization: Bearer $HA_TOKEN" \
  | jq -r '.[] | select(.entity_id | startswith("light.")) | "\(.entity_id): \(.state)"'

# Sensors
curl -s "$HA_URL/api/states" -H "Authorization: Bearer $HA_TOKEN" \
  | jq -r '.[] | select(.entity_id | startswith("sensor.")) | "\(.entity_id): \(.state) \(.attributes.unit_of_measurement // "")"'
```

Replace the domain prefix (`switch.`, `light.`, `sensor.`, etc.) to discover entities
in any domain.

### Get single entity state

```bash
curl -s "$HA_URL/api/states/ENTITY_ID" -H "Authorization: Bearer $HA_TOKEN"
```

### Area & Floor Discovery

Use the template API to query areas, floors, and labels.

```bash
# List all areas
curl -s -X POST "$HA_URL/api/template" \
  -H "Authorization: Bearer $HA_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"template": "{{...
README
# Home Assistant Skill

An AI agent skill for controlling Home Assistant devices and automations through natural language. 25 entity domains including lights, climate, locks, presence, weather, calendars, notifications, and more — all via the HA REST API.

Works with [Claude Code](https://docs.anthropic.com/en/docs/claude-code), [OpenClaw](https://github.com/openclaw/openclaw), [Cursor](https://cursor.com), and any tool supporting the [SKILL.md](https://agentskills.io) standard.

[![ClawHub](https://img.shields.io/badge/ClawHub-homeassistant--skill-blue)](https://clawhub.ai/skills/homeassistant-skill)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)

Part of [unsol.dev](https://unsol.dev)

## Prerequisites

- Home Assistant instance with API access
- `curl` and `jq` installed

## Installation

### Claude Code

```bash
git clone https://github.com/anotb/homeassistant-skill.git ~/.claude/skills/homeassistant-skill
```

### OpenClaw (via ClawdHub)

```bash
clawhub install homeassistant-skill
```

### Cursor / Other

Clone to your agent's skill directory.

## Configuration

1. Create a long-lived access token in Home Assistant: Profile → Long-Lived Access Tokens
2. Set environment variables:

```bash
export HA_URL=http://10.0.0.10:8123
export HA_TOKEN=your-long-lived-access-token
```

## What You Can Do

| Domain | Actions |
|--------|---------|
| Switches | Turn on, off, toggle |
| Lights | On/off, brightness, color, color temp |
| Scenes | Activate scenes |
| Scripts | List, run, run with variables |
| Automations | Trigger, enable, disable |
| Climate | Set temperature, HVAC mode |
| Covers | Open, close, set position (blinds, garage) |
| Locks | Lock, unlock (with safety confirmation) |
| Fans | On/off, speed |
| Media players | Play, pause, volume |
| Vacuum | Start, return to dock |
| Alarm | Arm, disarm (with safety confirmation) |
| Notifications | Send to mobile devices, list targets |
| Person / Presence | Who is home, device loca...

相关技能

OpenClaw

bambu-studio-ai

heyixuan2

Bambu Lab 3D printer control and automation. Activate when user mentions: printer status, 3D printing, slice, analyze model, generate 3D, AMS filament, print monitor, Bambu Lab, or any 3D printing task. Full pi...

OpenClaw

humanpages

human-pages-ai

Search and hire real humans for tasks — photography, delivery, research, and more

OpenClaw

openclaw-skills

zseven-w

Reusable skill templates for OpenClaw AI agents. Templates for API integration, data processing, web scraping, CLI tools, and file processing.

OpenClaw

geo-optimization

capt-marbles

Generative Engine Optimization (GEO) for AI search visibility. Optimize content to appear in ChatGPT, Perplexity, Claude, and Google AI Overviews. Use when optimizing websites, pages, or content for LLM discove...