šŸ¦žOpenClaw Guide
← All Integrations
šŸ 

Home Assistant

Mediumā±ļø 15-20 minutes

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

  1. In Home Assistant → Profile (bottom left)
  2. Scroll to Long-Lived Access Tokens
  3. Click "Create Token"
  4. 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

yaml
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      - automation

Step 4: Test the Connection

bash
openclaw test integration home-assistant

Natural Language Control

bash
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:

bash
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 PM

Automations

Trigger existing Home Assistant automations:

bash
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:

yaml
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
1

Get a long-lived access token

In Home Assistant, go to your profile, scroll to Long-Lived Access Tokens, and create one.

2

Note your HA URL

Get your Home Assistant URL (local or Nabu Casa remote access).

3

Configure OpenClaw

Add Home Assistant URL and token to your OpenClaw configuration.

4

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.

Join Vibe Combinator →

šŸ™ 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 →