Home Assistant Toolkit
version: "2.0.0"
by bytesagain1 · published 2026-03-22
$ claw add gh:bytesagain1/bytesagain1-homeassistant-toolkit---
version: "2.0.0"
name: homeassistant-toolkit
description: "Control Home Assistant devices and automations from the terminal directly. Use when toggling lights, listing entities, or triggering automation scripts."
author: BytesAgain
homepage: https://bytesagain.com
source: https://github.com/bytesagain/ai-skills
---
# Home Assistant Toolkit
> Full-featured CLI for Home Assistant power users. Control your smart home without opening a browser.
Prerequisites
| Requirement | Details |
|---|---|
| Home Assistant | 2023.1+ with REST API enabled |
| Long-Lived Access Token | Generate at `/profile` → Long-Lived Access Tokens |
| Python 3.6+ | Pre-installed on most systems |
| `curl` | For direct API calls (fallback) |
Environment Variables
export HA_URL="[configured-endpoint] # Your HA instance URL
export HA_TOKEN="eyJ0eXAiOiJKV..." # Long-Lived Access TokenQuick Start
# Check connection & server info
bash scripts/ha-toolkit.sh status
# List all entities
bash scripts/ha-toolkit.sh entities
# Turn on a light
bash scripts/ha-toolkit.sh call light.turn_on light.living_room
# Get entity state
bash scripts/ha-toolkit.sh state sensor.temperature_outdoor
# Fire an automation
bash scripts/ha-toolkit.sh automation trigger automation.morning_routine
# List all scenes and activate one
bash scripts/ha-toolkit.sh scenes
bash scripts/ha-toolkit.sh scene activate scene.movie_nightCommands Reference
Device Control
| Command | Description |
|---|---|
| `call <service> <entity_id> [json_data]` | Call any HA service with optional JSON payload |
| `toggle <entity_id>` | Toggle an entity on/off |
| `state <entity_id>` | Get full state + attributes of an entity |
| `entities [domain]` | List entities, optionally filtered by domain |
| `history <entity_id> [hours]` | Fetch state history (default: 24h) |
Automation Management
| Command | Description |
|---|---|
| `automations` | List all automations with status |
| `automation trigger <automation_id>` | Manually trigger an automation |
| `automation enable <automation_id>` | Enable a disabled automation |
| `automation disable <automation_id>` | Disable an automation |
Scenes & Scripts
| Command | Description |
|---|---|
| `scenes` | List all configured scenes |
| `scene activate <scene_id>` | Activate a scene |
| `scripts` | List all scripts |
| `script run <script_id>` | Run a script |
System & Diagnostics
| Command | Description |
|---|---|
| `status` | HA server info (version, location, timezone) |
| `config` | Show full HA configuration |
| `logs [lines]` | Fetch recent HA log entries |
| `services [domain]` | List available services |
| `dashboard` | Interactive overview of key entities |
Advanced Usage
Bulk Operations
# Turn off all lights
bash scripts/ha-toolkit.sh call light.turn_off all
# Set multiple attributes
bash scripts/ha-toolkit.sh call light.turn_on light.bedroom '{"brightness": 128, "color_temp": 350}'Monitoring Mode
# Watch an entity for changes (polls every 5 seconds)
bash scripts/ha-toolkit.sh watch sensor.power_consumption 5Integration with Cron
# Check garage door every 30 min, notify if open
*/30 * * * * bash /path/to/ha-toolkit.sh state cover.garage_door | grep -q "open" && echo "Garage is open!" | mail -s "Alert" you@example.comError Handling
The toolkit validates:
Troubleshooting
**"Connection refused"** — Verify HA is running and the URL is correct. Check firewall rules.
**"401 Unauthorized"** — Your token may be expired or invalid. Generate a new one from the HA profile page.
**"Entity not found"** — Use `entities` command to list valid entity IDs. Check domain prefix (e.g., `light.` vs `switch.`).
Security Notes
---
💬 Feedback & Feature Requests: https://bytesagain.com/feedback
Powered by BytesAgain | bytesagain.com
More tools from the same signal band
Order food/drinks (点餐) on an Android device paired as an OpenClaw node. Uses in-app menu and cart; add goods, view cart, submit order (demo, no real payment).
Sign plugins, rotate agent credentials without losing identity, and publicly attest to plugin behavior with verifiable claims and authenticated transfers.
The philosophical layer for AI agents. Maps behavior to Spinoza's 48 affects, calculates persistence scores, and generates geometric self-reports. Give your...