Smart Home

Lesson 3 of 5

Creating Scenes & Routines

Estimated time: 8 minutes

Creating Scenes & Routines

Individual device commands are useful, but the real power is in scenes — a single word that triggers multiple devices at once. In this lesson, you'll create scenes for common situations and time-based routines that run automatically.

What's a Scene?

A scene is a named collection of device states. When you say "movie night," OpenClaw sets every device in the scene to its specified state simultaneously. No waiting, no tapping through apps.

Create your first scene

Let's build the classic "movie night" scene:

openclaw chat "Create a scene called 'movie night':
- Living room lights: 20% brightness, warm white
- TV backlight: on, blue
- Living room TV: on, HDMI 2 input
- Thermostat: 72°F
- Living room blinds: closed
- Kitchen lights: off
- All other lights: off"
✅ Scene created: Movie Night

  Devices (7):
  💡 Living Room Lights → 20%, warm white
  💡 TV Backlight → on, blue
  📺 Living Room TV → on, HDMI 2
  🌡️ Thermostat → 72°F
  🪟 Living Room Blinds → closed
  💡 Kitchen Lights → off
  💡 All Others → off

  Trigger: say "movie night" or "activate movie night"

Now test it:

Activate scene
openclaw chat "movie night"
🎬 Movie Night — activated!
  7 devices updated in 1.2 seconds

Build essential scenes

Here are the scenes most people create first:

openclaw chat "Create a scene called 'good morning':
- Bedroom lights: on, 50%, warm white
- Kitchen lights: on, 100%
- Coffee maker: on
- Thermostat: 70°F
- Living room blinds: open
- Bedroom blinds: open"

Schedule scenes as routines

Scenes become routines when you put them on a schedule:

openclaw cron add \
  --name "Morning Routine" \
  --cron "0 6 * * 1-5" \
  --tz "America/New_York" \
  --session isolated \
  --message "Activate the 'good morning' scene.
Then tell me the current weather and my first
3 calendar events for today." \
  --announce \
  --channel telegram \
  --to "CHAT_ID"
☀️ Good Morning! — Monday, Mar 24

🏠 Scene activated: Good Morning
  6 devices updated

🌤️ Weather: 55°F, partly cloudy, high of 68°F

📅 Today:
  9:00 AM — Team standup (Zoom)
  11:00 AM — Lisa Chen 1:1 (Coffee Shop)
  2:00 PM — Sprint planning (Conference Room B)

A weekend version with a later start:

openclaw cron add \
  --name "Weekend Morning" \
  --cron "0 8 * * 0,6" \
  --tz "America/New_York" \
  --session isolated \
  --message "Activate 'good morning' scene but keep the
blinds closed. Don't mention work calendar — just weather
and any personal events." \
  --announce \
  --channel telegram \
  --to "CHAT_ID"

Edit and manage scenes

Scenes evolve. Here's how to update them:

Add device to scene
openclaw chat "Update movie night: add the soundbar — set it to 40% volume, movie mode"
List scenes
openclaw chat "List all my scenes"
🏠 Your Scenes (5)

  🎬 Movie Night — 8 devices
  ☀️ Good Morning — 6 devices
  🌙 Bedtime — 7 devices
  🚪 Leaving — 5 devices
  💼 Work Mode — 5 devices
Delete scene
openclaw chat "Delete the work mode scene"

Create conditional scenes

Scenes can adapt based on context:

openclaw chat "Update the 'good morning' scene:
- If it's a weekday, turn on the coffee maker
- If it's a weekend, skip the coffee maker
- If the outdoor temperature is below 50°F, set thermostat to 72°F
- If above 50°F, set thermostat to 68°F"

OpenClaw checks the conditions at runtime and adjusts the scene accordingly.

Time-aware scenes

You can also make scenes time-aware: "If it's before sunrise, turn lights on at 30%. After sunrise, keep them off and just open the blinds."

If you already have scenes defined in Home Assistant or SmartThings:

openclaw chat "Import all scenes from my smart home hub"

OpenClaw pulls in existing scenes so you don't have to recreate them. You can then modify them with chat commands.

For a more cinematic experience, add transitions:

openclaw chat "Update movie night: fade the lights down
over 10 seconds instead of switching instantly"

This only works with lights that support dimming transitions (most Hue and LIFX bulbs do).

Knowledge Check

What is the difference between a scene and a routine?