Home Assistant Skill for Openclaw

A powerful Python-based bridge for controlling Home Assistant devices, sensors, and scenes via a command-line interface.

mischa-petschenig
v1.0.0
Mar 9, 2026
0
973
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install home-assistant-bridge-python

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install home-assistant-bridge-python using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Home Assistant Skill?

This skill enables seamless integration between your AI agent and a Home Assistant instance. By leveraging the Home Assistant REST API and a specialized Python bridge, it allows for granular control over smart home devices. Whether you need to toggle lights, adjust climate settings, or query sensor history, this addition to your Openclaw Skills library provides a robust interface for home automation.

The skill is designed for reliability and ease of use, featuring an alias system that translates friendly names into technical entity IDs. This makes it ideal for users who want to interact with their smart home environment using natural language or simple scripts while maintaining the technical power of the Home Assistant ecosystem.

Home Assistant Skill Use Cases

  • Automated lighting control based on schedules or triggers provided by the agent.
  • Monitoring environment sensors like temperature and humidity for data analysis and reporting.
  • Managing climate systems and HVAC modes to optimize energy usage.
  • Activating complex home scenes with a single command through the bridge.
  • Verifying device states after executing commands to ensure operational reliability in a smart home setup.

How Home Assistant Skill Works

  1. The user or agent triggers a command through the Python bridge (e.g., turning on a light).
  2. The ha-bridge.py script parses the command and checks aliases.json to resolve any friendly names into valid Home Assistant entity IDs.
  3. The script authenticates with the Home Assistant instance using a long-lived access token stored in the local configuration.
  4. A REST API request is dispatched to the Home Assistant server to perform the requested action or fetch data.
  5. If the --verify flag is used, the script waits for a short period to confirm the state change was successful before returning the result.

Home Assistant Skill Setup

To get started with this skill in your Openclaw Skills collection, follow these steps:

  1. Navigate to the script directory:
cd /root/.openclaw/workspace/skills/home-assistant/scripts
  1. Run the setup script to configure your Home Assistant URL and Token:
./ha-setup.sh
  1. Load the generated configuration into your environment:
source ~/.homeassistant.conf
  1. Initialize your aliases by copying the example file:
cp scripts/aliases.example.json scripts/aliases.json

Home Assistant Skill Data Schema & Taxonomy

The skill manages configuration and device mapping through the following files:

File Description
~/.homeassistant.conf Stores HA_URL and HA_TOKEN environment variables for API authentication.
aliases.json A JSON map linking friendly names to entity IDs (e.g., "kitchen": "switch.kitchen_light").
ha-bridge.py The central logic hub that processes commands and returns JSON-formatted state data.

All state and history queries return standard JSON objects compatible with Openclaw Skills data processing workflows.

Home Assistant Skill Advanced Features

  • Friendly Alias System: Map complex entity IDs to simple names like "bedroom" or "thermostat" for easier interaction.
  • State Verification: Use the --verify flag to automatically check the device state 3 seconds after a command is sent.
  • Granular Light Control: Adjust brightness levels, color temperatures (mireds), and RGB values through dedicated flags.
  • Detailed History Access: Retrieve up to 48 hours of historical data for any sensor or device to track trends.
  • Entity Discovery: Built-in search functionality to find specific entities or domains without leaving the terminal.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*