homeassistant-cli_skill

This skill provides an interactive Home Assistant CLI experience with auto-completion, real-time event monitoring, and rich output formats for quick management.
  • Python

2.5k

GitHub Stars

3

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill openclaw/skills --skill homeassistant-cli

  • _meta.json289 B
  • README.md3.1 KB
  • SKILL.md4.8 KB

Overview

This skill provides advanced Home Assistant control using the official hass-cli tool, delivering an interactive, discovery-friendly command-line experience. It adds auto-completion, real-time event monitoring, history queries, and flexible output formatting for faster troubleshooting and exploration. Use it when you want richer interactivity and readable output compared to curl-based approaches.

How this skill works

The skill wraps the hass-cli feature set to query states, call services, watch events, and retrieve history from a configured Home Assistant instance. It relies on a long-lived access token and HASS_SERVER/HASS_TOKEN environment variables to authenticate and communicate with the Home Assistant API. Output can be formatted as table, YAML, or JSON and supports no-headers mode for scripting.

When to use it

  • You interact frequently with Home Assistant from the terminal and want auto-completion and discovery.
  • You need real-time event monitoring (state changes, automation triggers) in a console.
  • You want history queries and human-friendly output (YAML/JSON/table) for debugging.
  • You prefer an interactive CLI to explore entities and services instead of crafting curl commands.
  • You need richer output formatting for logs, troubleshooting, or manual checks.

Best practices

  • Generate and store a long-lived Home Assistant access token and set HASS_SERVER and HASS_TOKEN in your shell config for persistence.
  • Enable shell auto-completion (bash/zsh/fish) to speed up entity and service discovery.
  • Use output flags (-o yaml or -o json) when sharing results or piping into parsers; use --no-headers for scripts.
  • Prefer service list and state list to discover IDs before calling services to avoid errors.
  • Test connection with hass-cli info after configuring the token and server to confirm access.

Example use cases

  • Quickly list all lights and inspect current states: hass-cli state list light
  • Turn on a light with brightness: hass-cli service call light.turn_on --arguments entity_id=light.bedroom,brightness=128
  • Monitor state changes during a device test: hass-cli event watch state_changed
  • Retrieve the last hour of history for multiple entities for troubleshooting: hass-cli state history --since 1h light.living_room switch.fan
  • List services and view details in YAML before invoking to confirm arguments: hass-cli -o yaml service list homeassistant.toggle

FAQ

Create a long-lived access token in your Home Assistant profile and export HASS_SERVER and HASS_TOKEN in your shell (for example in ~/.bashrc).

Can I use hass-cli in scripts?

Yes. Use --no-headers and -o json for predictable machine-readable output suitable for scripting.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational