Tutorial

OpenClaw Home Assistant Integration: Control Your Smart Home via Chat

Connect OpenClaw to Home Assistant for natural language control of lights, thermostats, locks, and 1000+ smart home devices.

By OpenClaw Team ¡
Home Assistant Control skill illustration with smart home hub icons and connected device nodes.

The Home Assistant Control skill (#7 in the OpenClaw ecosystem, 680 stars) connects your smart home to OpenClaw’s natural language interface. Send “turn on the living room lights” through Telegram or WhatsApp and watch your house respond. No app switching, no scripting complexity — just conversational control over lights, climate systems, locks, sensors, and every other device Home Assistant supports.

This guide walks through installation, device discovery, natural language commands, automation workflows, and advanced configuration. If you are building a private smart home assistant on Raspberry Pi hardware, also read the Raspberry Pi AI Assistant Playbook for complete hardware selection and deployment guidance.

Why Home Assistant?

Home Assistant has become the de facto standard for local smart home control, and for good reason. It supports over 1000 device integrations, runs entirely on your own hardware, and gives you complete control over your automation logic. Unlike cloud-only platforms that lock you into specific ecosystems, Home Assistant works with nearly every brand and protocol: Philips Hue, Nest thermostats, Ring doorbells, Z-Wave sensors, Zigbee bulbs, Sonos speakers, and hundreds more.

Key advantages:

  • Local control: Commands execute on your network without routing through manufacturer cloud services. This means faster responses, better privacy, and continued operation even if your internet connection goes down.
  • No cloud dependencies: Your smart home data stays in your house. No subscription fees, no vendor shutdowns, no remote access concerns.
  • Free and open-source: Home Assistant is community-developed and free to use. No licensing costs, no vendor lock-in.
  • Protocol unification: Connect Zigbee, Z-Wave, Wi-Fi, Bluetooth, MQTT, and dozens of other protocols through a single interface.
  • Extensibility: Thousands of community integrations and custom components extend functionality beyond official support.

When you connect OpenClaw to Home Assistant, you get natural language control over this entire ecosystem through the messaging apps you already use every day.

Prerequisites

Before installing the Home Assistant Control skill, you need:

  1. Home Assistant installed and running: You can run Home Assistant on Docker, Home Assistant OS (HAOS), or in a supervised installation. The installation method does not matter as long as Home Assistant is accessible on your network.
  2. Network access to your Home Assistant instance: OpenClaw needs to reach Home Assistant’s API endpoint, typically at http://YOUR_HA_IP:8123. If running OpenClaw and Home Assistant on the same device, use http://localhost:8123.
  3. A long-lived access token: Home Assistant uses token-based authentication for API access. You will create this in a later step.

If you have not yet installed Home Assistant, start at home-assistant.io/installation and choose the installation method that matches your hardware and experience level.

Installation Steps

Installing the Home Assistant Control skill takes about 10 minutes from start to first command. The process involves creating credentials in Home Assistant, installing the skill in OpenClaw, and testing basic device control.

Step 1: Create a Long-Lived Access Token

Home Assistant requires authentication for all API calls. Long-lived access tokens provide secure, persistent authentication without exposing your login credentials.

  1. Open your Home Assistant web interface (typically http://YOUR_HA_IP:8123).
  2. Click your profile icon in the bottom left corner.
  3. Scroll to the bottom and find the Long-Lived Access Tokens section.
  4. Click Create Token.
  5. Enter a descriptive name like “OpenClaw Integration”.
  6. Copy the generated token immediately — Home Assistant only shows it once.

Store this token securely. You will need it in the next step.

Step 2: Install the Home Assistant Skill

In your OpenClaw environment, run:

openclaw config set skills.home-assistant true

This enables the Home Assistant skill. Now configure the connection:

openclaw config set homeassistant.url http://YOUR_HA_IP:8123
openclaw config set homeassistant.token YOUR_LONG_LIVED_TOKEN

Replace YOUR_HA_IP with your Home Assistant’s IP address (or localhost if running on the same machine) and YOUR_LONG_LIVED_TOKEN with the token you created in Step 1.

If you prefer environment variables over config files:

export HA_URL=http://192.168.1.100:8123
export HA_TOKEN=eyJ0eXAiOiJKV1QiLCJhbGc...
openclaw config set homeassistant.url $HA_URL
openclaw config set homeassistant.token $HA_TOKEN

Step 3: Restart OpenClaw

Restart the OpenClaw gateway to load the skill:

openclaw gateway restart

Or if running in Docker:

docker restart openclaw

Step 4: Test Basic Commands

Send a test message through your configured channel (Telegram, WhatsApp, etc.):

You: “What devices do you see in Home Assistant?”

OpenClaw: Should respond with a list of discovered entities from your Home Assistant setup.

Then try a simple control command:

You: “Turn on the living room lamp.”

If the lamp responds, installation is complete. If you get an error, check the troubleshooting section at the end of this guide.

Device Discovery

OpenClaw discovers devices automatically from Home Assistant’s entity registry the first time you ask about devices or attempt a control command. Home Assistant organizes everything as “entities” — each light, switch, sensor, thermostat, and lock is an entity with a unique ID like light.living_room_lamp or climate.bedroom_thermostat.

How Discovery Works

When you send a command that references a device, OpenClaw:

  1. Queries Home Assistant’s /api/states endpoint for all entities
  2. Filters entities by type (light, switch, climate, lock, sensor, etc.)
  3. Matches your natural language description against entity names and friendly names
  4. Executes the appropriate service call for the matched entity

This happens transparently. You do not need to configure device mappings manually.

Device Naming Conventions

For best results, use descriptive, unambiguous names in Home Assistant. OpenClaw matches against both the entity ID and the friendly name.

Good naming examples:

  • light.living_room_lamp with friendly name “Living Room Lamp”
  • climate.bedroom_thermostat with friendly name “Bedroom Thermostat”
  • lock.front_door with friendly name “Front Door Lock”
  • sensor.kitchen_temperature with friendly name “Kitchen Temperature”

Avoid generic names like light.light_1 or switch.switch_2. These are hard to reference in natural language and prone to confusion when you have multiple similar devices.

Grouping Devices

Home Assistant supports grouping entities. If you create a group called “Downstairs Lights” that contains light.living_room, light.kitchen, and light.hallway, you can control all three with a single command:

You: “Turn off the downstairs lights.”

Create groups in Home Assistant’s configuration.yaml:

group:
  downstairs_lights:
    name: Downstairs Lights
    entities:
      - light.living_room
      - light.kitchen
      - light.hallway

Restart Home Assistant after editing configuration files.

Room Assignments

Home Assistant’s area feature automatically groups devices by room. If you assign devices to areas in Home Assistant’s UI (Settings → Devices & Services → Areas), OpenClaw can reference them by area:

You: “Turn off all the lights in the bedroom.”

This command finds all light entities assigned to the “Bedroom” area and turns them off together.

Natural Language Commands

OpenClaw translates conversational requests into Home Assistant service calls. The skill understands a wide range of phrasings and device types. You do not need to memorize exact syntax — just describe what you want in plain language.

Lights

Turn on/off:

  • “Turn on the living room lights.”
  • “Turn off the bedroom lamp.”
  • “Switch on the porch light.”

Brightness control:

  • “Set the living room lights to 50 percent.”
  • “Dim the bedroom lamp.”
  • “Brighten the kitchen lights.”

Color control (for color-capable bulbs):

  • “Set the living room lights to blue.”
  • “Change the bedroom lamp to warm white.”
  • “Make the desk light red.”

Climate Control

Temperature:

  • “Set the bedroom temperature to 22 degrees.”
  • “Turn up the living room thermostat.”
  • “What’s the thermostat set to in the office?”

Mode changes:

  • “Set the thermostat to heat mode.”
  • “Switch the AC to cool.”
  • “Turn off the bedroom heating.”

Locks

Status checks:

  • “Is the front door locked?”
  • “Check the garage door lock status.”

Lock/unlock:

  • “Lock the front door.”
  • “Unlock the back door.”

Note: For security, some deployments disable remote unlock commands. See the Advanced Configuration section for permission controls.

Sensors

Status queries:

  • “What’s the temperature in the kitchen?”
  • “Is there motion in the hallway?”
  • “What’s the humidity upstairs?”
  • “Show me the battery level on the front door sensor.”

Sensors are read-only. OpenClaw retrieves their current state from Home Assistant but cannot change sensor values.

Scenes

Home Assistant scenes capture the state of multiple devices and restore them with a single command. If you have a scene called “Movie Mode” that dims the lights and closes the blinds:

You: “Activate movie mode.”

OpenClaw calls Home Assistant’s scene.turn_on service with the matching scene entity.

Create scenes in Home Assistant’s UI or in configuration.yaml:

scene:
  - name: Movie Mode
    entities:
      light.living_room:
        state: on
        brightness: 25
      cover.living_room_blinds:
        state: closed

Complex Commands

OpenClaw can parse multi-device commands and conditional logic:

Multi-device:

  • “Turn off all the lights except the hallway.”
  • “Set the living room and bedroom to 70 degrees.”

Conditional:

  • “If the kitchen temperature is below 18, turn on the heater.”
  • “Lock the front door if it’s after 10 PM.”

These rely on OpenClaw’s language model understanding intent and translating it into sequential Home Assistant API calls. Complex conditionals may require clarification or multiple steps.

Automation Workflows

The real power of combining OpenClaw with Home Assistant appears when you start chaining actions across different skills and data sources. Because OpenClaw can access your calendar, task list, weather data, and home automation in the same conversation, you can build routines that react to context.

Voice-Triggered Automations

Simple triggered routines:

You: “Goodnight.”

OpenClaw (via configured routine):

  1. Locks all doors
  2. Turns off all lights except the bedroom
  3. Sets the thermostat to night mode
  4. Arms the security system
  5. Confirms: “Goodnight. Doors locked, lights off, thermostat set to 65F.”

Configure this as a scene or script in Home Assistant, then reference it by name through OpenClaw.

Scheduled Routines

Combine OpenClaw’s scheduling with Home Assistant control:

You: “At 7 AM every weekday, turn on the coffee maker and set the living room to 72 degrees.”

OpenClaw: Creates a scheduled task that calls Home Assistant services at the specified time.

You can also trigger routines based on Home Assistant’s built-in automation engine and have OpenClaw notify you of the results.

Conditional Actions

Context-aware automations adapt to current conditions:

You: “If the temperature drops below 18 tonight, turn on the bedroom heater.”

OpenClaw: Monitors the temperature sensor and triggers the heater when the condition is met.

Another example:

You: “When I get home, turn on the porch light and unlock the front door.”

This requires location tracking (via Home Assistant’s presence detection or a connected skill). OpenClaw watches for the presence change and executes the action sequence.

Integration with Other Skills

Combining skills creates powerful workflows:

Calendar → Home Preparation:

You: “Prepare the house for my 3 PM meeting.”

OpenClaw:

  1. Checks your calendar (via Calendar Scheduler skill)
  2. Finds the 3 PM meeting
  3. At 2:55 PM: Turns on office lights, sets Do Not Disturb on devices, closes the office door (if you have a smart lock), and adjusts the thermostat

Task List → Evening Routine:

You: “What’s left on my task list, and set the house to evening mode.”

OpenClaw:

  1. Retrieves your open tasks (via Todoist or Task Tracker skill)
  2. Summarizes remaining items
  3. Activates your “Evening Mode” scene in Home Assistant

These workflows eliminate app switching and manual coordination.

Advanced Configuration

The default Home Assistant skill configuration works for most users, but you can customize behavior for security, performance, and specific device handling.

Custom Entity Mappings

If you have devices with ambiguous names or want to create aliases, configure custom mappings in OpenClaw’s config:

skills:
  home-assistant:
    url: http://192.168.1.100:8123
    token: ${HA_LONG_LIVED_TOKEN}
    entity_aliases:
      "TV room lights": light.media_room_ceiling
      "Main thermostat": climate.downstairs_nest
      "Garage": cover.garage_door

Now you can reference these devices with shorter or more intuitive names.

Exposing Only Specific Devices

For privacy or safety, you might want to limit which devices OpenClaw can control. Configure an allowlist:

skills:
  home-assistant:
    url: http://192.168.1.100:8123
    token: ${HA_LONG_LIVED_TOKEN}
    expose_only:
      - light.*
      - climate.*
      - sensor.temperature_*

This configuration exposes all lights, all climate devices, and temperature sensors, but hides locks, cameras, and other sensitive entities.

Security: Restricting Control by User or Channel

If multiple people use your OpenClaw instance, restrict certain commands to specific users or channels:

skills:
  home-assistant:
    url: http://192.168.1.100:8123
    token: ${HA_LONG_LIVED_TOKEN}
    permissions:
      unlock_doors:
        allowed_users:
          - your_telegram_id
        allowed_channels:
          - telegram
      climate_control:
        allowed_users:
          - your_telegram_id
          - family_member_telegram_id

Now only authorized users can unlock doors, while climate control is available to a broader group.

YAML Configuration Example

Complete configuration with all options:

skills:
  home-assistant:
    enabled: true
    url: http://192.168.1.100:8123
    token: ${HA_LONG_LIVED_TOKEN}

    # Device discovery
    auto_discover: true
    discovery_interval: 300  # seconds

    # Entity filtering
    expose_only:
      - light.*
      - climate.*
      - lock.*
      - sensor.*

    # Custom aliases
    entity_aliases:
      "Front porch": light.porch_light
      "Main AC": climate.downstairs_thermostat

    # Permissions
    permissions:
      unlock_doors:
        allowed_users:
          - 123456789
      climate_control:
        allowed_users:
          - 123456789
          - 987654321

    # Response preferences
    confirm_actions: true
    verbose_responses: false

Restart OpenClaw after editing configuration files.

Voice Control Integration

Combining the Home Assistant Control skill with the Voice Wake & Talk Mode skill creates a fully hands-free smart home assistant. You can walk into a room and say “Hey Claw, turn on the lights” without touching your phone.

Voice Command Workflow

Typical interaction with both skills enabled:

  1. Wake word: “Hey Claw”
  2. OpenClaw: Beep or voice acknowledgment
  3. You: “Turn on the living room lights and set the temperature to 70.”
  4. OpenClaw: Executes both commands through Home Assistant and responds: “Living room lights on. Thermostat set to 70 degrees.”

Raspberry Pi as Always-On Voice Assistant

A Raspberry Pi running OpenClaw, Home Assistant, and the Voice Wake & Talk skill creates a powerful, private alternative to commercial voice assistants like Alexa or Google Home. The complete setup:

  1. Install OpenClaw on a Raspberry Pi (see Raspberry Pi AI Assistant Playbook)
  2. Install Home Assistant on the same Pi or a separate device
  3. Enable the Home Assistant Control skill
  4. Enable the Voice Wake & Talk skill with a USB microphone
  5. Configure your wake word and voice preferences

The result: a smart home assistant that runs entirely on your network, costs under $150 in hardware, and uses less than 10 watts of power.

For complete hardware selection, installation, and performance tuning guidance, read the full Raspberry Pi AI Assistant Playbook.

Troubleshooting

Connection Errors

Symptom: “Unable to connect to Home Assistant” or timeout errors.

Solutions:

  • Verify Home Assistant is running and accessible: Open http://YOUR_HA_IP:8123 in a browser.
  • Check the URL in OpenClaw’s config. Use the IP address, not localhost, if OpenClaw and Home Assistant run on different devices.
  • Verify network connectivity: ping YOUR_HA_IP from the OpenClaw host.
  • Check firewall rules. Home Assistant’s port 8123 must be accessible from the OpenClaw host.

Device Not Found

Symptom: “I couldn’t find that device” or “No entity matches that name.”

Solutions:

  • Check the device name in Home Assistant’s UI (Settings → Devices & Services → Entities).
  • Use the exact friendly name or a close approximation.
  • Ask OpenClaw to list all devices: “What devices do you see?”
  • Verify the device is exposed (check expose_only config if you set it).

Permission Denied

Symptom: “You don’t have permission to control that device.”

Solutions:

  • Check the permissions section in your OpenClaw config.
  • Verify your user ID is in the allowed_users list for the relevant permission group.
  • Remove permission restrictions temporarily to test: comment out the permissions block and restart OpenClaw.

State Sync Issues

Symptom: OpenClaw reports incorrect device states (e.g., says lights are off when they are on).

Solutions:

  • Home Assistant may not have received the state update yet. Wait a few seconds and query again.
  • Check Home Assistant’s logs for entity update errors.
  • Restart the Home Assistant integration for the affected device.
  • Force a discovery refresh: Restart the OpenClaw gateway.

FAQ

Do I need Home Assistant Cloud?

No. The OpenClaw Home Assistant Control skill connects directly to your local Home Assistant instance via its local API. Home Assistant Cloud (Nabu Casa) is a paid service that provides remote access and voice assistant integrations, but it is not required for OpenClaw integration. OpenClaw works perfectly with a standard, self-hosted Home Assistant installation.

Can I control devices when away from home?

Yes, but you need to configure remote access to your Home Assistant instance. Options:

  1. VPN: Set up a VPN (like WireGuard or Tailscale) to your home network. OpenClaw connects to Home Assistant over the VPN as if it were local.
  2. Reverse proxy: Expose Home Assistant through a reverse proxy with SSL (such as Nginx Proxy Manager or Caddy). Use HTTPS and strong authentication.
  3. Home Assistant Cloud: Subscribe to Nabu Casa for managed remote access.

The VPN approach is the most secure because your Home Assistant instance never exposes ports to the public internet.

Which devices are supported?

Any device or service integrated into Home Assistant is accessible through OpenClaw. Home Assistant supports over 1000 integrations including:

  • Lighting: Philips Hue, LIFX, IKEA Tradfri, TP-Link Kasa, Nanoleaf, generic Zigbee/Z-Wave bulbs
  • Climate: Nest, Ecobee, Honeywell, generic thermostats and HVAC systems
  • Locks: August, Yale, Schlage, generic Z-Wave/Zigbee locks
  • Security: Ring, Arlo, Wyze, generic cameras and alarm systems
  • Media: Sonos, Chromecast, Roku, Apple TV, Plex
  • Sensors: Temperature, humidity, motion, door/window contact sensors
  • Covers: Smart blinds, garage door openers
  • Switches: Smart plugs, relays, power monitoring outlets

If it works in Home Assistant, it works with OpenClaw.

Next Steps

Now that you have OpenClaw controlling your smart home, consider these next steps:

  • Raspberry Pi deployment: Read the Raspberry Pi AI Assistant Playbook to run OpenClaw and Home Assistant on dedicated hardware for 24/7 operation.
  • Voice control: Enable the Voice Wake & Talk skill for hands-free control.
  • Advanced automations: Explore Home Assistant’s automation engine and trigger complex routines through OpenClaw.
  • Multi-skill workflows: Combine Home Assistant Control with Calendar Scheduler to prepare your home before meetings, or with Task Tracker to link task completion with home scenes.

Your smart home is now chat-native. Control it from anywhere, through any messaging app, with the same natural language you use every day.

Ready to Get Started?

Install OpenClaw and build your own AI assistant today.

Related Articles