To control Home Assistant devices from OpenClaw, run `clawhub install home-assistant`, set HOME_ASSISTANT_URL and HOME_ASSISTANT_TOKEN in your OpenClaw config, and start issuing voice-style commands in OpenClaw chat. Once configured, you can control lights, thermostats, locks, fans, and any other Home Assistant device — or trigger automations — using plain English from any device running OpenClaw.
Control Your Entire Smart Home From OpenClaw
Home Assistant is already the central hub for millions of smart homes, connecting devices from hundreds of different manufacturers into a unified platform. The OpenClaw Home Assistant skill makes your entire smart home accessible through natural language commands — the same interface you use to research, write, and automate knowledge work becomes the interface for controlling your physical environment.
The practical impact is significant: instead of opening the Home Assistant app, navigating to the correct dashboard, and tapping the right button, you tell OpenClaw what you want and it translates your intent into the correct Home Assistant service call. 'Turn off all the lights in the living room and set the thermostat to 68' becomes a single prompt that OpenClaw breaks into two targeted API calls. 'What is the current temperature outside and inside?' pulls sensor data and presents it in a readable format. 'Activate the movie night scene' triggers a Home Assistant scene that adjusts a dozen devices simultaneously.
This integration covers the full breadth of what Home Assistant supports: lights (brightness, color, color temperature), climate (heating, cooling, fan modes), locks (lock, unlock, check status), media players (play, pause, volume), sensors (temperature, humidity, motion, power consumption), scripts, scenes, and automations. Any entity in your Home Assistant dashboard is accessible from OpenClaw chat.
Integration method
The Home Assistant skill is a native ClawHub skill that communicates with your Home Assistant instance via its built-in REST API and WebSocket connection. It authenticates using a Long-Lived Access Token generated in your Home Assistant profile, then allows OpenClaw to control any entity in your Home Assistant setup — lights, switches, climate, locks, media players, scripts, scenes, and automations. The skill runs entirely within OpenClaw and connects directly to your Home Assistant instance over your local network or through a remote access URL.
Prerequisites
- OpenClaw installed and running (see openclaw.ai for installation instructions)
- ClawHub CLI available in your terminal (comes bundled with OpenClaw)
- Home Assistant running on your local network (or accessible via a remote URL such as Nabu Casa or a VPN)
- Home Assistant account with access to your profile settings to generate a Long-Lived Access Token
- Basic knowledge of your Home Assistant entity names (you can find these in the Home Assistant UI under Settings > Devices & Services)
Step-by-step guide
Install the Home Assistant Skill via ClawHub
Install the Home Assistant Skill via ClawHub
Open your terminal and run the ClawHub install command. The Home Assistant skill adds smart home control capabilities to your OpenClaw instance, translating natural language commands into Home Assistant REST API calls and WebSocket messages. After installation completes, ClawHub displays the required configuration keys: HOME_ASSISTANT_URL (the URL of your Home Assistant instance) and HOME_ASSISTANT_TOKEN (a Long-Lived Access Token). The skill will not activate until both are provided — using it before configuration produces a helpful error message pointing to the missing credentials. If ClawHub is not found (`clawhub: command not found`), your OpenClaw installation may be incomplete. Reinstall OpenClaw from openclaw.ai to get a fresh installation including the bundled ClawHub CLI.
1clawhub install home-assistantPro tip: Run `clawhub info home-assistant` to see all configuration options including optional settings like entity_name_aliases (for giving OpenClaw friendlier names for your devices) and default_area.
Expected result: Terminal shows: 'home-assistant@X.X.X installed successfully. Required config: HOME_ASSISTANT_URL, HOME_ASSISTANT_TOKEN'. The skill appears in `clawhub list` output.
Generate a Long-Lived Access Token in Home Assistant
Generate a Long-Lived Access Token in Home Assistant
Home Assistant uses Long-Lived Access Tokens for API authentication. These tokens are tied to your user account and grant full API access to your Home Assistant instance. To generate one, log in to your Home Assistant interface and navigate to your profile. Click your username in the bottom-left corner of the Home Assistant sidebar to open your profile page. Scroll all the way to the bottom of the profile page to find the 'Long-Lived Access Tokens' section. Click 'Create Token'. Give the token a descriptive name like 'OpenClaw Integration' so you can identify it later. Home Assistant generates the token immediately and displays it in a modal — this is the ONLY time the full token is shown. Copy it now to a safe temporary location. The token is a long string of random characters (around 180 characters). It does not expire by default, though you can revoke it from the same profile page at any time. Your HOME_ASSISTANT_URL is the address you use to access Home Assistant in a browser. On your local network this is typically `http://homeassistant.local:8123` or `http://192.168.1.X:8123`. If you access Home Assistant remotely via Nabu Casa, your URL will be in the format `https://YOUR_INSTANCE_ID.ui.nabu.casa`.
Pro tip: Home Assistant's local URL `http://homeassistant.local:8123` uses mDNS and works on most home networks. If that does not resolve, find your Home Assistant device's IP address in your router's admin panel and use the IP directly: `http://192.168.1.X:8123`.
Expected result: You have a Long-Lived Access Token copied and your Home Assistant URL ready. The token is approximately 180 characters long and cannot be recovered if lost — if you lose it, simply revoke it and generate a new one.
Configure HOME_ASSISTANT_URL and HOME_ASSISTANT_TOKEN in OpenClaw
Configure HOME_ASSISTANT_URL and HOME_ASSISTANT_TOKEN in OpenClaw
Add your Home Assistant credentials to OpenClaw's configuration. Both values can be set via the `clawhub config set` command or by editing `~/.openclaw/.env` directly. The HOME_ASSISTANT_URL should not have a trailing slash — the skill appends the correct API path (`/api`) automatically. After adding the credentials, run `clawhub reload` to apply the changes. OpenClaw will test the connection by making a request to the Home Assistant `/api/` endpoint. A successful connection returns the Home Assistant version and message 'API running.' You will see this confirmation in the OpenClaw log on first use. If you use Home Assistant with SSL/HTTPS (recommended for any remote access setup), ensure your URL starts with `https://`. Home Assistant with a self-signed certificate may require setting `ssl_verify: false` in the skill config — only do this on a trusted private network.
1# Option A: Add to ~/.openclaw/.env2HOME_ASSISTANT_URL=http://homeassistant.local:81233HOME_ASSISTANT_TOKEN=your-long-lived-access-token-here45# Option B: Set via clawhub config commands6clawhub config set HOME_ASSISTANT_URL http://homeassistant.local:81237clawhub config set HOME_ASSISTANT_TOKEN your-long-lived-access-token-here89# Apply changes10clawhub reload1112# Verify both are set13clawhub config get HOME_ASSISTANT_URL14clawhub config get HOME_ASSISTANT_TOKENPro tip: Keep your Long-Lived Access Token private — it grants full API access to your Home Assistant instance. If it is accidentally exposed (e.g., in a screenshot or commit), revoke it immediately from your Home Assistant profile and generate a new one.
Expected result: Both config values confirmed. OpenClaw successfully connects to Home Assistant and the skill shows as active after `clawhub reload`.
Test the Skill with Device Control and State Queries
Test the Skill with Device Control and State Queries
Open OpenClaw chat and test the integration with a simple device command. The Home Assistant skill understands natural language descriptions of devices and actions, translating them into the correct entity IDs and service calls. The skill matches your descriptions against your Home Assistant entity list. If you say 'turn on the kitchen lights', it searches your entities for items with 'kitchen' and 'light' in their name or friendly name. Home Assistant entities have IDs like `light.kitchen_overhead` but also have friendly names you set in the UI — the skill searches both. For best results, use the same names you see in your Home Assistant dashboard. You can also ask OpenClaw to list all devices in a specific area, get the current state of any entity, or trigger automations and scripts by their name. State queries return the current value of any Home Assistant entity — temperature sensors, lock status, motion sensor state, power consumption, and more.
Turn on the kitchen lights and set them to 50% brightness.
Paste this in OpenClaw chat
Pro tip: If OpenClaw cannot find a device by your description, ask it to 'list all Home Assistant entities in the kitchen' to see exact entity names. You can then reference those names in future commands for precise control.
Expected result: The kitchen lights turn on at 50% brightness. OpenClaw confirms the action with the entity ID and new state (e.g., 'light.kitchen_overhead: on, brightness 128/255').
Advanced: Control Automations, Scenes, and Multiple Devices
Advanced: Control Automations, Scenes, and Multiple Devices
The Home Assistant skill goes beyond individual device control. You can trigger automations by name, activate scenes that adjust multiple devices simultaneously, and issue multi-device commands in a single prompt. OpenClaw processes compound commands by breaking them into individual service calls and executing them in parallel. For automations, you can trigger them manually through the API regardless of their configured trigger conditions. This is useful for testing automations or triggering them on demand outside their normal schedule. Scenes are particularly powerful: a single scene can turn on specific lights at specific brightness levels, set the thermostat, start a media player, and lock certain doors — all with one OpenClaw prompt. OpenClaw lists the actions a scene will take before executing it if you ask. RapidDev recommends setting up entity aliases in the skill configuration for rooms and device groups — this lets you say 'the downstairs' or 'the office' and have OpenClaw automatically map these to the correct entity groups in Home Assistant.
Activate my 'evening mode' scene and then check the status of all door locks in the house.
Paste this in OpenClaw chat
1# ~/.openclaw/skills/home-assistant.yaml — optional advanced configuration2home-assistant:3 url: "" # Leave blank if using HOME_ASSISTANT_URL env var4 token: "" # Leave blank if using HOME_ASSISTANT_TOKEN env var5 ssl_verify: true # Set false only for self-signed certs on trusted networks6 # Friendly aliases for areas and device groups7 aliases:8 downstairs: ["light.living_room", "light.kitchen", "light.dining_room"]9 upstairs: ["light.bedroom", "light.hallway", "light.bathroom"]10 office: ["light.office_desk", "light.office_overhead", "climate.office"]11 default_area: "living_room" # Used when no area is specified in a commandPro tip: Configure the `aliases` section to match how you naturally refer to areas in your home. This dramatically improves command recognition — 'turn off the upstairs' works perfectly when your alias maps 'upstairs' to the correct entity list.
Expected result: OpenClaw executes multi-device commands and scene triggers correctly, with a confirmation listing each entity changed and its new state.
Common use cases
Natural Language Device Control
Replace tapping through apps with plain English commands. Control individual devices or groups of devices across your home using descriptions that match how you naturally think about your space, without memorizing device names or navigating dashboards.
Turn off all the lights in the house, set the downstairs thermostat to 70 degrees, and lock the front door.
Copy this prompt to try it in OpenClaw
Home Status Queries
Ask OpenClaw for a snapshot of your home's current state — which doors and windows are open, current temperature readings from all sensors, which lights are on, and whether any devices are consuming unexpected power.
Give me a home status report: are any doors or windows open, what is the temperature in each room, and which lights are currently on?
Copy this prompt to try it in OpenClaw
Triggering Automations and Scenes
Trigger complex Home Assistant automations and scenes that adjust multiple devices simultaneously. Rather than setting up separate voice assistant routines, use OpenClaw as your universal automation trigger from any platform it is installed on.
Activate the 'good morning' scene and tell me what devices it will change.
Copy this prompt to try it in OpenClaw
Troubleshooting
OpenClaw returns 'home-assistant: authentication failed' or '401 Unauthorized'
Cause: HOME_ASSISTANT_TOKEN is not set, is set incorrectly, or the token was revoked in Home Assistant. Long-Lived Access Tokens are case-sensitive and very long — any truncation causes a 401.
Solution: Run `clawhub config get HOME_ASSISTANT_TOKEN` to verify the token is set (it will appear masked). If missing or suspiciously short, regenerate the token in Home Assistant (Profile > Long-Lived Access Tokens > Create Token) and re-set it with `clawhub config set HOME_ASSISTANT_TOKEN your-new-token`. Run `clawhub reload`.
1# Re-set the token2clawhub config set HOME_ASSISTANT_TOKEN YOUR_FULL_TOKEN_HERE3clawhub reloadclawhub install home-assistant fails with '429 Too Many Requests'
Cause: ClawHub's skill registry has temporary rate limits during high-traffic periods.
Solution: Wait 2-3 minutes and retry. Use `clawhub install home-assistant --force` if a partial install is blocking the retry.
1clawhub install home-assistant --forceOpenClaw cannot find a device — 'entity not found' even though the device exists in Home Assistant
Cause: The entity ID or friendly name in Home Assistant does not match what OpenClaw is searching for. Entity names in Home Assistant can include special characters or non-intuitive IDs.
Solution: Ask OpenClaw to 'list all Home Assistant entities' or 'list all lights' to see the exact entity IDs and friendly names. Use those exact names in subsequent commands, or add aliases in the skill's YAML config to map your preferred names to entity IDs.
Home Assistant skill connects locally but fails when accessing remotely
Cause: HOME_ASSISTANT_URL is set to a local network IP that is not accessible from outside your home network. Remote access requires a Nabu Casa URL, a VPN, or another remote access solution.
Solution: For remote access, use your Nabu Casa URL (Settings > Home Assistant Cloud > Remote UI URL), configure a VPN that puts your remote device on the local network, or set up a reverse proxy with a domain name. Update HOME_ASSISTANT_URL to the remote-accessible URL.
1# Update to Nabu Casa URL for remote access2clawhub config set HOME_ASSISTANT_URL https://YOUR_ID.ui.nabu.casa3clawhub reloadBest practices
- Use Home Assistant's friendly names for devices rather than entity IDs when setting up aliases — friendly names like 'Living Room Lamp' are more readable and easier to reference in OpenClaw prompts.
- Generate a dedicated Long-Lived Access Token specifically for OpenClaw (named 'OpenClaw Integration') so you can revoke it independently without affecting other integrations.
- Configure the `aliases` section in the skill YAML to map natural area names to entity groups — this makes compound commands like 'turn off the downstairs' work correctly without enumerating every entity.
- Store HOME_ASSISTANT_TOKEN in `~/.openclaw/.env` rather than any shared config file — this credential grants full access to your Home Assistant instance and should be treated like a house key.
- Test automations in Home Assistant with small, reversible actions first before creating OpenClaw commands that trigger complex automations affecting multiple devices.
- For homes with frequent visitors or shared OpenClaw setups, consider creating a restricted Home Assistant user with limited entity access and generating the token under that user rather than your admin account.
- Use state queries before issuing commands in multi-step workflows — 'check if the front door is locked before setting the away scene' prevents redundant actions and confirms the real-world state.
Alternatives
OpenHue connects directly to a Philips Hue Bridge for faster, more granular light control — use it instead of Home Assistant if your smart home is exclusively Hue lights and you want lower latency commands.
SonosCLI provides dedicated Sonos speaker control with playback, volume, and grouping — use it alongside Home Assistant when you need more detailed audio control than Home Assistant's media player entities provide.
Frequently asked questions
How do I install the Home Assistant skill in OpenClaw?
Run `clawhub install home-assistant` in your terminal. Then generate a Long-Lived Access Token in your Home Assistant profile (click your username > bottom of profile page > Create Token). Add it to OpenClaw with `clawhub config set HOME_ASSISTANT_TOKEN your-token` and `clawhub config set HOME_ASSISTANT_URL http://homeassistant.local:8123`. Run `clawhub reload` and start using smart home commands in OpenClaw chat.
What is HOME_ASSISTANT_URL for the OpenClaw integration?
It is the URL you use to open Home Assistant in a browser. On a local network this is typically `http://homeassistant.local:8123` or `http://192.168.1.X:8123`. For remote access via Nabu Casa, use your Nabu Casa remote URL from Settings > Home Assistant Cloud. Do not include a trailing slash.
How do I configure the Home Assistant API token in OpenClaw?
Generate a Long-Lived Access Token from your Home Assistant profile page (scroll to the bottom of the profile). Copy the token — it is only shown once. Then run `clawhub config set HOME_ASSISTANT_TOKEN your-token`. The token grants full API access, so keep it private and never commit it to a git repository.
ClawHub install home-assistant is not working — what should I do?
Check that the skill name is `home-assistant` with a hyphen. If the install fails with a network error, wait a few minutes and retry — ClawHub's registry occasionally has brief rate limits. Run `clawhub install home-assistant --force` to clear any partial installation state. Ensure you have an active internet connection during the install, as ClawHub downloads the skill package from the registry.
Can OpenClaw control all my Home Assistant devices?
Yes — the skill accesses the Home Assistant REST API which exposes all entities in your Home Assistant instance: lights, switches, climate, locks, media players, sensors, input controls, scripts, scenes, and automations. Any entity visible in your Home Assistant dashboard is controllable or queryable from OpenClaw chat.
Why does OpenClaw keep saying it cannot find my device?
OpenClaw matches your descriptions against Home Assistant entity IDs and friendly names. If the match fails, ask OpenClaw to 'list all entities' or 'list all lights' to see what names Home Assistant is using. You can then add aliases in the skill's YAML config to map your preferred names to the correct entity IDs.
Does RapidDev offer help with OpenClaw Home Assistant configuration?
Yes — RapidDev can assist with configuring the Home Assistant skill for complex smart home setups, particularly when setting up entity aliases, multi-area commands, or integrating Home Assistant control into broader OpenClaw automation workflows. The self-serve setup covers most individual use cases; teams or power users with complex environments can reach out to RapidDev for configuration support.
Talk to an Expert
Our team has built 600+ apps. Get personalized help with your project.
Book a free consultation