home-assistant

Control Home Assistant devices, read sensors, and manage automations using the Python Bridge. Use when the user wants to interact with their smart home - turning lights on/off, adjusting thermostats, reading sensor data, checking device states, or creating/modifying automations. Works with any Home Assistant instance accessible via REST API.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "home-assistant" with this command: npx skills add mischa-petschenig/home-assistant-bridge-python

Home Assistant Skill (Python Bridge)

Integration with Home Assistant via Python Bridge for reliable smart home control.

Prerequisites

  • Home Assistant instance running (local or remote)
  • Long-lived access token from HA profile
  • Network connectivity to HA instance
  • Python 3 with requests module

Configuration

One-time setup:

cd /root/.openclaw/workspace/skills/home-assistant/scripts
./ha-setup.sh

This creates ~/.homeassistant.conf with your HA_URL and HA_TOKEN.

Load configuration:

source ~/.homeassistant.conf

Core Commands

All commands go through ha-bridge.py. Aliases are supported everywhere — use friendly names instead of entity IDs.

Device Control

python3 ha-bridge.py on <entity|alias>          # Turn on
python3 ha-bridge.py off <entity|alias>         # Turn off
python3 ha-bridge.py toggle <entity|alias>      # Toggle
python3 ha-bridge.py on <entity> --verify       # Turn on + verify state after 3s

Examples:

python3 ha-bridge.py on kitchen                 # Alias → switch.kitchen_light_relay
python3 ha-bridge.py off tv --verify            # Turn off + verify
python3 ha-bridge.py toggle bedroom             # Toggle bedroom light

Light Control

python3 ha-bridge.py light <entity|alias> --brightness <0-255>
python3 ha-bridge.py light <entity|alias> --color-temp <mireds>
python3 ha-bridge.py light <entity|alias> --rgb "255,0,0"

Examples:

python3 ha-bridge.py light bedroom --brightness 128
python3 ha-bridge.py light kitchen --rgb "255,200,100"

Climate Control

python3 ha-bridge.py climate <entity|alias> --temperature <value>
python3 ha-bridge.py climate <entity|alias> --mode <heat|cool|auto|off>

Scene Activation

python3 ha-bridge.py scene <scene_entity>

Read States

python3 ha-bridge.py states                     # All entities (JSON)
python3 ha-bridge.py state <entity|alias>       # Specific entity (JSON)

Search Entities

python3 ha-bridge.py search <query>             # Search by name or entity_id
python3 ha-bridge.py search licht               # Find all "licht" entities
python3 ha-bridge.py search temp --domain sensor  # Only sensors matching "temp"

History

python3 ha-bridge.py history <entity|alias>              # Last 24h
python3 ha-bridge.py history kitchen --hours 48           # Last 48h

Aliases

python3 ha-bridge.py aliases                    # Show all configured aliases

Aliases are stored in scripts/aliases.json. Edit directly to add/change/remove.

Services

python3 ha-bridge.py services                   # List all available HA services

Alias System

Aliases map friendly names to entity IDs. Stored in scripts/aliases.json:

{
  "kitchen": "switch.kitchen_light_relay",
  "bedroom": "light.bedroom_led_strip",
  "thermostat": "climate.living_room"
}

Use aliases anywhere an entity ID is expected.

Aliases

Aliases are stored in scripts/aliases.json. Copy scripts/aliases.example.json as starting point:

cp scripts/aliases.example.json scripts/aliases.json

Then edit with your own device mappings. Use python3 ha-bridge.py search <query> to find entity IDs.

Status Delay Note

Home Assistant needs 1-3 seconds to update state after a command. Use --verify to auto-check after 3 seconds.

File Structure

skills/home-assistant/
├── SKILL.md                          # This file
├── README.md                         # Human-readable docs
├── scripts/
│   ├── ha-bridge.py                  # Main bridge (all commands)
│   ├── ha-setup.sh                   # One-time setup
│   ├── aliases.json                  # Your alias mappings (create from example)
│   └── aliases.example.json          # Example alias mappings
└── references/
    └── finding-entities.md           # How to find entity IDs

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

Skill Oracle

Skill Oracle — Curated documentation of quality ClawHub skills. Markdown tables telling agents which tools work and which are empty. Not an API or code library.

Registry SourceRecently Updated
Coding

1688 Item One Click

1688 商品一键操作 —— 提供商品快速修改能力,支持一键修改标题、主图和发布会员号动态。 工具能力:修改商品标题、修改商品主图、发布会员号动态,传入商品ID和新内容即可完成操作。 触发词:修改标题、改标题、换标题、修改主图、换主图、一键修改、商品修改、发动态、会员号动态、私域营销、上新通知。

Registry SourceRecently Updated
Coding

96push

User-approved 96Push desktop client publishing helper — query platforms/accounts, create content, inspect platform rules, and publish only after explicit con...

Registry SourceRecently Updated
3220Profile unavailable
Coding

google-search-web

调用 Google 网页搜索接口,获取实时网页搜索结果。使用此技能当用户需要:Google 搜索/网页搜索/搜索引擎查询、调用 /google/search/web 接口、用 Python 脚本执行 Google 搜索、获取搜索结果列表(标题/链接/摘要)。Use this skill for Google we...

Registry SourceRecently Updated
00Profile unavailable