Home Assistant
Control your smart home with AI
OpenClaw Home Assistant Integration
Control your entire smart home through natural language. OpenClaw connects to Home Assistant's REST API so you can ask questions about your home state and trigger automations just by talking to your assistant.
Requirements
- Home Assistant running on your local network (or remotely accessible)
- Long-lived access token from Home Assistant
- OpenClaw on same network (or with remote access configured)
Setup
Step 1: Get a Long-Lived Access Token
- In Home Assistant ā Profile (bottom left)
- Scroll to Long-Lived Access Tokens
- Click "Create Token"
- Name it "OpenClaw" ā copy the token
Step 2: Get Your Home Assistant URL
Your HA URL is typically:
- Local:
http://homeassistant.local:8123 - Remote:
https://your-instance.duckdns.org
Step 3: Configure OpenClaw
integrations: homeAssistant: enabled: true url: "http://homeassistant.local:8123" token: "your-long-lived-access-token" # Optional: only expose certain domains allowedDomains: - light - switch - climate - sensor - automationStep 4: Test the Connection
openclaw test integration home-assistantNatural Language Control
Turn on the living room lightsā living_room_light turned on āSet bedroom temperature to 68°Fā Thermostat set to 68°F āIs the front door locked?ā Yes, front_door_lock is locked (last changed 3h ago)What's the temperature outside?ā Weather station reads 72°F, humidity 45%Run the "Movie Night" sceneā Automation triggered āState Monitoring
Ask about any sensor in your home:
Are any windows open?ā 2 windows open: Kitchen window, Bedroom windowWhat's the air quality?ā Living room CO2: 842 ppm (slightly elevated)Did anyone arrive home?ā person.john arrived at 6:32 PMAutomations
Trigger existing Home Assistant automations:
Start the morning routineā Running automation: morning_routine āOr create new automations through conversation (requires automation domain access).
Cron-Based Smart Home
Combine with OpenClaw's cron system:
crons: - name: "Evening check" schedule: "0 21 * * *" action: "Check all doors locked and report to Telegram"Every evening at 9pm, your assistant checks security state and sends a report.
Troubleshooting
Connection refused? Verify HA is accessible from where OpenClaw runs. Check URL and port (8123 default).
401 Unauthorized? Token may have expired. Generate a new long-lived token in HA profile.
Entity not found? Entity IDs are case-sensitive. Use HA's developer tools to find exact IDs.
Privacy
All communication happens on your local network (unless HA is remote). No smart home data leaves your home unless you explicitly enable it.
Features
Natural language control
Turn devices on/off, adjust settings using plain English
State queries
Ask about any sensor, device, or automation state
Automation triggers
Run existing Home Assistant automations by name
Scene support
Activate scenes like 'Movie Night' or 'Good Morning'
Scheduled monitoring
Cron jobs that check home state and send reports
Full entity access
Access all Home Assistant domains: lights, climate, locks, sensors
Use Cases
Voice-like control
Control your home from any messaging app ā Telegram, Discord, iMessage
Security monitoring
Ask if doors are locked, windows are closed, alarms are armed
Energy awareness
Track power consumption, temperatures, and environmental sensors
Routine automation
Trigger morning/evening routines with a single message
Setup Guide
Requirements
- āHome Assistant instance running
- āLong-lived access token
- āNetwork access to Home Assistant API
Get a long-lived access token
In Home Assistant, go to your profile, scroll to Long-Lived Access Tokens, and create one.
Note your HA URL
Get your Home Assistant URL (local or Nabu Casa remote access).
Configure OpenClaw
Add Home Assistant URL and token to your OpenClaw configuration.
Test connection
Ask your assistant to list your Home Assistant entities or turn on a light.
Limitations
- ā ļøInitial entity discovery may take time for large installations
- ā ļøReal-time updates require additional configuration
Frequently Asked Questions
Does it work with Nabu Casa?
Yes, any URL that reaches your Home Assistant API works, including Nabu Casa remote access.
Can it create automations?
It can trigger existing automations and scripts. Creating new automations requires editing yaml or the HA UI.
What devices are supported?
Any device in Home Assistant. If HA can control it, your assistant can control it.
Is it secure?
The access token gives full control over Home Assistant. Protect your OpenClaw config and use a dedicated token you can revoke.
š„ Your AI should run your business, not just answer questions.
We'll show you how.Free to join.
Related Integrations
š Learn More
AI Assistant vs Chatbot: What's the Difference?
ChatGPT is great for questions. But an AI assistant can actually DO things for you - send emails, set reminders, control your smart home.
How to Control Your Smart Home with AI
Manage lights, thermostat, and devices through natural conversation.
Self-Hosted AI Assistant ā Private & Secure
Run your AI assistant on your own hardware. No cloud, no data sharing, complete privacy. OpenClaw is the self-hosted AI that never phones home.
OpenClaw Installation Guide ā All Platforms (Linux, macOS, Unraid)
Complete installation guide covering gateway setup, Ollama integration, systemd services, and troubleshooting common setup errors like ECONNREFUSED and model loading issues.
š Your AI should run your business.
Weekly live builds + template vault. We'll show you how to make AI actually work.Free to join.
Join Vibe Combinator ā