Home Assistant CLI for Openclaw

An advanced command-line interface for Home Assistant providing deep control over smart devices, event monitoring, and history tracking.

joneschi
v1.0.0
Feb 1, 2026
13
5.9k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install homeassistant-cli

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 homeassistant-cli 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 CLI?

The Home Assistant CLI skill leverages the official hass-cli tool to provide a rich, interactive experience for managing smart home ecosystems. Unlike basic implementations, this skill offers auto-completion, structured output formatting, and real-time event watching, making it an essential component for power users of Openclaw Skills who want precise control over their environment through a terminal interface.

This skill bridges the gap between manual dashboard control and complex automation scripts by offering a developer-friendly interface. It allows for seamless discovery of entities and services, providing high-fidelity data in formats like YAML and JSON to integrate with other workflows or scripts. By utilizing the official ecosystem tool, users benefit from a robust and feature-complete integration that far exceeds simple API calls.

Home Assistant CLI Use Cases

  • Controlling lights, switches, and scenes directly from a terminal or through an AI agent.
  • Monitoring real-time system events to debug automation triggers and device states.
  • Querying historical state data for sensors and devices to analyze home performance or energy usage.
  • Exploring available services and entity IDs during the development of complex smart home routines.

How Home Assistant CLI Works

  1. The skill interfaces with the local or remote Home Assistant instance via the official hass-cli binary.
  2. It authenticates using a Long-Lived Access Token and server URL provided via environment variables to ensure secure communication.
  3. Users or agents issue commands to list entities, call specific services, or watch live events.
  4. The tool processes these requests and returns formatted data in table, JSON, or YAML formats, allowing Openclaw Skills to interpret the state of the home accurately.

Home Assistant CLI Setup

Install the core dependency using pip or Homebrew depending on your operating system:

# Via Pip
pip install homeassistant-cli

# Via Homebrew
brew install homeassistant-cli

Next, configure your environment variables with your server URL and a Long-Lived Access Token generated from your Home Assistant profile:

export HASS_SERVER=https://homeassistant.local:8123
export HASS_TOKEN=<your-token>

Verify the connection by running hass-cli info to ensure the skill is correctly linked to your instance.

Home Assistant CLI Data Schema & Taxonomy

The skill interacts with the Home Assistant REST API and organizes data based on the standard entity-state model. Key data structures include:

Data Component Description Supported Formats
Entities State information for lights, switches, and sensors Table, YAML, JSON
Services Available methods and domains to interact with devices YAML, JSON
Events Real-time streams of system-wide state changes Text Stream
History Time-series data of entity states over a specified period Table, JSON

Home Assistant CLI Advanced Features

  • Real-time event monitoring using the event watch command for live debugging and trigger validation.
  • Flexible output switching between YAML and JSON for seamless programmatic integration with other tools.
  • State history queries with time-relative flags like --since 50m to track device behavior.
  • Advanced service calls with multiple arguments and targeted entity IDs for precise device orchestration.
  • Integrated auto-completion for entity IDs and services in bash, zsh, and fish shells.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*