homeassistant-cli
Advanced Home Assistant control using the official hass-cli tool. Features auto-completion, event monitoring, history queries, and rich output formatting. Alternative to the curl-based homeassistant skill - choose this if you want a more interactive CLI experience with better discovery and formatting.
Why use this skill?
Integrate your smart home with OpenClaw using the official hass-cli. Access entity states, trigger services, monitor live events, and query history effortlessly.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/joneschi/homeassistant-cliWhat This Skill Does
The homeassistant-cli skill provides a sophisticated, command-line interface for interacting with your Home Assistant smart home ecosystem. Unlike basic curl-based integrations, this skill leverages the official hass-cli tool to provide an interactive experience. It bridges the gap between terminal-based automation and smart home control, allowing users to query states, trigger complex service calls, monitor live events, and view history directly from their OpenClaw terminal. By wrapping the full power of hass-cli, it enables rich output formatting—including YAML, JSON, and tables—making it significantly easier to parse data compared to raw API responses.
Installation
To integrate this capability, run the following command in your terminal: clawhub install openclaw/skills/skills/joneschi/homeassistant-cli. Before usage, ensure your Home Assistant server is accessible. You must navigate to your Home Assistant profile page, generate a long-lived access token, and export the HASS_SERVER and HASS_TOKEN variables within your shell environment configuration (e.g., .bashrc or .zshrc). Verify your configuration by running hass-cli info to confirm the connection is authenticated and stable.
Use Cases
This skill is perfect for power users who manage large numbers of entities and desire granular control. Use it for batch updates to lighting scenes, debugging automation triggers via real-time event monitoring, or performing ad-hoc history lookups to diagnose sensor fluctuations. It is particularly useful for developers writing local scripts who need to verify device states without logging into the Home Assistant web GUI.
Example Prompts
- "Check the current status of all living room lights and set their brightness to 50%."
- "Watch for any automation_triggered events in real-time and list all available switches."
- "Show me the last state change for the kitchen temperature sensor using the history command."
Tips & Limitations
For best results, use the -o flag to switch between output formats (table, yaml, or json) based on your need for readability versus machine-parsability. Be mindful that this tool requires constant network access to your local Home Assistant instance; it will fail if the server is unreachable. Unlike the lightweight curl skill, this requires a Python environment and the installation of the hass-cli package, making it slightly heavier but far more powerful for daily interactive tasks.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-joneschi-homeassistant-cli": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: network-access, external-api