Smart Home

Lesson 4 of 5

Natural Language Commands

Estimated time: 6 minutes

Natural Language Commands

So far, you've been giving OpenClaw direct commands like "turn off the kitchen lights." But the real magic happens when you can talk to your home the way you'd talk to a person: "it's too bright in here" or "I'm heading to bed." In this lesson, you'll teach OpenClaw to understand intent, not just instructions.

From Commands to Conversations

Compare these two approaches:

Direct CommandNatural Language
"Set living room lights to 50%""It's too bright in here"
"Set thermostat to 68°F""I'm a bit cold"
"Turn on porch light, lock front door""I just got home"
"Turn off all lights, set thermostat to eco""We're leaving for the weekend"

The natural language version is easier to remember and more flexible. OpenClaw figures out what you mean.

Enable intent mapping

Configure OpenClaw to interpret natural language as smart home actions:

openclaw config set home-assistant.natural-language true
openclaw config set home-assistant.context-prompt \
  "When the user sends a message about their home environment,
interpret their intent and execute the appropriate smart home
commands. Consider:
- Time of day and typical routines
- Current device states
- Seasonal context (temperature expectations)
- The specific room they're likely in

Always confirm what you did after executing."

Test conversational commands

Try these natural language messages:

Temperature intent
openclaw chat "it is way too warm in here"
🌡️ I've turned down the thermostat.

  Living Room Thermostat: 72°F → 69°F
  (It was set 3 degrees above your usual preference)

  If that's still too warm, just say "colder" and
  I'll drop it another 2 degrees.
Lighting intent
openclaw chat "I can barely see my book"
💡 I've brightened your reading area.

  Living Room Lights: 30% → 75%, warm white
  Bedside Lamp: off → on, 60%

  (It's 8:30 PM — I kept the color warm to avoid
  disrupting your sleep cycle)

Notice how OpenClaw considers the time of day when choosing light temperature. At 2 PM it would use daylight; at 8:30 PM it uses warm white.

Teach contextual shortcuts

Create shorthand phrases that OpenClaw learns:

openclaw chat "Learn these shortcuts:
- 'I'm home' → turn on hallway lights, unlock front door,
  set thermostat to 71°F
- 'I'm leaving' → activate the 'leaving' scene
- 'guests coming' → living room lights 100%, thermostat 71°F,
  porch light on, play background music
- 'winding down' → dim all lights to 20%, set thermostat to 68°F"
✅ 4 shortcuts learned

  "I'm home" → 3 device actions
  "I'm leaving" → Leaving scene
  "guests coming" → 4 device actions
  "winding down" → 2 device actions

These work with variations too — "heading out",
"going to leave", "got home" will all match.

Variations are automatic

OpenClaw understands synonyms and variations. "Heading out," "going out," "leaving now," and "gotta run" all trigger the same "I'm leaving" shortcut. You don't need to program every variation.

Ask questions about your home

OpenClaw can report on your home status conversationally:

Security check
openclaw chat "is everything locked up for the night?"
🔒 Security Check:

  ✅ Front door — locked
  ✅ Back door — locked
  ✅ Garage door — closed
  ⚠️ Kitchen window sensor — open

  Everything is locked, but the kitchen window is still
  open. Want me to remind you, or is that intentional?
Energy check
openclaw chat "what is using the most energy right now?"
⚡ Current Energy Usage:

  1. HVAC — 2.1 kW (cooling, thermostat at 72°F)
  2. Dryer — 1.8 kW (running, 20 min remaining)
  3. EV Charger — 1.4 kW (charging, 67% → est. done 11 PM)
  4. Kitchen Lights — 0.1 kW

  Total: ~5.4 kW
  Tip: The HVAC is your biggest draw. Raising the
  thermostat by 2°F could save ~15% on cooling.

Family-friendly commands

If multiple family members use the chat, set up per-person context:

In a shared family chat, OpenClaw identifies who's speaking:

openclaw config set home-assistant.multi-user true
openclaw chat "User preferences:
- Emma (admin): full control of all devices
- Jake (teen): can control bedroom + bathroom only
- Kids: can only ask questions, no control"

Over time, OpenClaw learns your patterns:

openclaw chat "Track my usage patterns for 2 weeks,
then suggest automations based on what you observe."

After two weeks, you might get suggestions like:

  • "You turn on the coffee maker every weekday at 6:45 AM. Want me to automate that?"
  • "You always dim the living room lights after 9 PM. Should I make that automatic?"

When a command is ambiguous, OpenClaw asks:

You: "turn off the lights"

OpenClaw: "Which lights? You have lights on in 3 rooms:
1. Living room (80%)
2. Kitchen (100%)
3. Porch (on)

Say 'all' for everything, or specify the room."

You can set a default behavior: openclaw config set home-assistant.ambiguous-action "ask" (options: ask, all, current-room).

Knowledge Check

How does OpenClaw handle the command 'it's too bright in here' differently from 'set lights to 50%'?