Install
openclaw skills install home-assistant-controlControl and inspect Home Assistant via REST API for entities, states, services, scenes, scripts, and automations. Use when the user asks to turn devices on/o...
openclaw skills install home-assistant-controlUse Home Assistant REST API with a long-lived access token.
bashcurljqHA_TOKEN)HA_URL_PUBLIC)python3pyyaml (required by skill-creator validator/packager scripts)HA_TOKEN (required)HA_URL_PUBLIC (required; canonical target and fallback)HA_URL_LOCAL is set (and no HA_URL override), local is tried first, then fallback to HA_URL_PUBLICHA_URL is an explicit override (if set, used directly)HA_ENV_FILE=/absolute/path/to/file.env when you want file-based secret loading.HA_ENV_FILE is not set, scripts only use environment variables already present in the shell.scripts/ha_call.sh and scripts/self_check.sh load env file only when HA_ENV_FILE is provided.references/naming-context.md for manual alias mappings first.GET /api/statesGET /api/states/{entity_id}POST /api/services/{domain}/{service}Headers:
Authorization: Bearer $HA_TOKENContent-Type: application/jsonscripts/ha_env.sh — loads env file only when HA_ENV_FILE is explicitly set, using safe KEY=VALUE parsing (no source/eval).scripts/ha_call.sh — generic API caller for Home Assistant.scripts/fill_entities_md.sh — generate references/entities.md from GET /api/states.
./scripts/fill_entities_md.sh./scripts/fill_entities_md.sh --domains light,switch,climate,sensorscripts/save_naming_context.sh — refresh references/naming-context.md for user-specific naming.
./scripts/save_naming_context.shscripts/ha_entity_find.sh — search entities by partial entity id or friendly name.
./scripts/ha_entity_find.sh kitchen./scripts/ha_entity_find.sh temp --domains sensor,climate --limit 30scripts/ha_safe_action.sh — execute service actions with safety checks and risk confirmation.
./scripts/ha_safe_action.sh light turn_on light.kitchen '{"brightness_pct":60}'./scripts/ha_safe_action.sh lock unlock lock.front_door --dry-run--yes to bypass interactive confirmation for risky domains.scripts/self_check.sh — verify prerequisites and API connectivity/auth before running actions.
./scripts/self_check.sh/api/...).HA_URL*), prefer HTTPS for public access.source on untrusted paths.references/entities.md — entity inventoryreferences/naming-context.md — user alias memory for natural names (e.g. "living room light")example_* IDs), no personal hostnames/tokens..env or any private env file with real tokens.