Smart Home Integration
OpenClaw + Home Assistant
Control your smart home devices, sensors, and automations from your AI assistant.
Category
Smart Home
Setup Time
~3 minutes
What you can do
- Control lights & switches
- Query sensor states
- Trigger automations
- View entity status
Setup Guide
Prerequisites
- OpenClaw running (see our deployment guide)
- Home Assistant installed and running
- Network access between OpenClaw and Home Assistant
Step 1: Generate a Long-Lived Access Token
- Open Home Assistant in your browser
- Go to Profile (bottom left) → Security
- Scroll to Long-Lived Access Tokens
- Click Create Token
- Name it "OpenClaw" and click OK
- Copy the token immediately — it won't be shown again
Step 2: Find Your Home Assistant URL
Your Home Assistant URL depends on your setup:
Local network:
http://homeassistant.local:8123
http://192.168.1.XXX:8123
Remote access ( Nabu Casa):
https://your-subdomain.ui.nabu.casa
Self-hosted with SSL:
https://home.yourdomain.com
Configuration
Add the Home Assistant channel to your OpenClaw config:
# In your openclaw config
channels:
homeassistant:
enabled: true
url: "http://homeassistant.local:8123"
token: "YOUR_LONG_LIVED_ACCESS_TOKEN"
Or via environment variables in your docker-compose.yml:
environment:
- HOMEASSISTANT_ENABLED=true
- HOMEASSISTANT_URL=http://homeassistant.local:8123
- HOMEASSISTANT_TOKEN=your_long_lived_token
Docker networking: If both run in Docker, use the container name or network alias instead of localhost.
Step 3: Restart OpenClaw
docker compose restart openclaw
Verification
Try asking OpenClaw to interact with Home Assistant:
"Turn on the living room lights"
"What's the temperature in the bedroom?"
"Show me all lights that are on"
"Trigger the 'Good Night' automation"
"Lock the front door"
Check logs for API calls:
docker compose logs -f openclaw | grep -i homeassistant
Common Issues
Connection refused: Ensure Home Assistant is running and accessible from the OpenClaw container. Check firewall rules and Docker networking.
Unauthorized: Verify your long-lived access token is correct. Regenerate if needed from Home Assistant profile settings.
Entity not found: Use exact entity IDs from Home Assistant (e.g., light.living_room). Check Developer Tools → States in HA.
Slow response: Home Assistant responds in milliseconds locally. Slow responses may indicate network issues or heavy automation load.
Frequently Asked Questions
Does OpenClaw work with Home Assistant?
Yes — OpenClaw integrates with Home Assistant via the REST API using a long-lived access token. It can control devices, query sensors, and trigger automations. Setup takes about 3 minutes.
Is the Home Assistant integration free?
Yes. The Home Assistant integration is free and included with OpenClaw. Home Assistant itself is open source and free. You only pay for hosting (~$7/mo) and AI API usage (~$3-10/mo).
How do I set up Home Assistant with OpenClaw?
Generate a long-lived access token in Home Assistant profile settings, add your Home Assistant URL and token to your OpenClaw config, and restart.
Can OpenClaw control all my smart home devices?
Yes. Any device or entity in Home Assistant is accessible via OpenClaw, including lights, switches, locks, sensors, climate controls, and media players.
Does OpenClaw work with Home Assistant Cloud (Nabu Casa)?
Yes. You can use your Nabu Casa remote URL with OpenClaw. This allows control even when you're away from home, using the secure Nabu Casa connection.
Ready to set up Home Assistant?
Follow our free guide to deploy OpenClaw and connect Home Assistant in minutes.
Official docs: https://docs.openclaw.ai/channels