Guide
OpenClaw + Home Assistant: The Complete Integration Guide
Bridge your OpenClaw AI agent to Home Assistant and give it the ability to discover devices, read sensors, control your home, and create intelligent automations — all through natural language.
Prerequisites
- A running Home Assistant instance (2024.1 or later)
- An OpenClaw agent installed on the same network
- ClawTether bridge added to your OpenClaw instance
- A Home Assistant Long-Lived Access Token (Settings → Security → Long-Lived Access Tokens)
Step 1: Install the ClawTether Bridge
Add ClawTether to your OpenClaw instance. The bridge handles protocol translation between your agent and Home Assistant's WebSocket API.
# Install the ClawTether bridge
openclaw plugin add clawtether
# Verify installation
openclaw plugins list
# => clawtether v1.0.0 (active)Step 2: Connect to Home Assistant
Point ClawTether at your Home Assistant instance. The bridge uses the WebSocket API for real-time device state updates.
# Configure the Home Assistant connection
clawtether connect \
--host 192.168.1.50 \
--token YOUR_LONG_LIVED_ACCESS_TOKEN
# Output:
# => Connected to Home Assistant 2025.12.1
# => WebSocket connection establishedStep 3: Discover Devices
Run device discovery to scan all entities registered in Home Assistant. ClawTether organizes them by area, type, and capability.
# Discover all available devices
clawtether bridge --discover
# Output:
# => Found 47 entities across 6 areas
# => Living Room: thermostat, 3 lights, motion sensor
# => Kitchen: temperature sensor, 2 lights, smart plug
# => Bedroom: thermostat, 2 lights, air quality sensor
# => Office: desk light, presence sensor, smart plug
# => Garage: door sensor, camera
# => Outdoor: weather station, 2 garden lightsStep 4: Set Permissions
Control exactly what your agent can access. Permissions are granular — grant read-only access to sensors while allowing full control over specific device types.
# Grant read access to all sensors
clawtether permissions set sensors --read
# Grant full control over lights and thermostats
clawtether permissions set lights --read --control
clawtether permissions set climate --read --control
# Keep cameras read-only (no PTZ control)
clawtether permissions set cameras --read
# View current permissions
clawtether permissions listStep 5: Control Devices
Your agent can now interact with Home Assistant devices through natural commands. ClawTether translates these into the correct Home Assistant service calls.
# Read sensor data
clawtether read sensor.living_room_temperature
# => 21.5°C
# Control a light
clawtether control light.office_desk --brightness 80 --color_temp warm
# Set thermostat
clawtether control climate.bedroom --temperature 20 --mode heat
# Toggle a smart plug
clawtether control switch.kitchen_coffee_machine --toggleStep 6: Create Automation Recipes
The real power comes from combining your agent's intelligence with Home Assistant automations. Here are three recipes to get you started.
Recipe 1: Comfort-aware climate control
Your agent monitors temperature, humidity, and occupancy to keep each room comfortable without wasting energy. It considers outdoor weather and time of day.
# Agent prompt example:
"Monitor all temperature sensors and thermostats. When a room is
occupied, maintain 21°C during the day and 19°C at night. When a
room is empty for 30 minutes, set it to eco mode (17°C). Factor
in outdoor temperature from the weather station."Recipe 2: Arrival-based scene setting
When the presence sensor detects someone arriving home, the agent sets up the appropriate scene based on time of day and recent habits.
# Agent prompt example:
"When the front door opens after 6 PM, turn on the hallway and
living room lights at 60% warm white, set the thermostat to 21°C,
and start the coffee machine if it's before 8 PM."Recipe 3: Air quality response
Your agent watches air quality sensors and takes corrective action automatically, explaining what it did and why.
# Agent prompt example:
"Monitor the air quality sensor in the bedroom. If CO2 exceeds
1000 ppm, open the smart vent. If PM2.5 exceeds 25, turn on the
air purifier. Log what you did and notify me."Troubleshooting
- Connection refused: Ensure Home Assistant is running and the WebSocket API is enabled (default port 8123). Check that your access token has not expired.
- Devices not showing: Run
clawtether bridge --discover --forceto rescan. Some devices may take a moment to appear after a Home Assistant restart. - Permission denied: Check your permissions with
clawtether permissions list. You may need to grant control access for the device type you are trying to operate. - Slow response times: If commands take more than 2 seconds, check your network. ClawTether uses WebSocket for low latency, but WiFi congestion can cause delays.
Next Steps
Now that your agent is connected to Home Assistant, explore these topics:
- Set up the secure remote tunnel to access your agent from anywhere
- Enable multi-device memory sync to share agent context across devices
- Add Zigbee and Matter devices directly (without Home Assistant) using ClawTether's native protocol support