Skip to main content
Scenes capture and restore the state of multiple entities at once. They provide a simple way to set your home to a specific configuration with a single action.

What is a Scene?

A scene is a snapshot of desired entity states that can be activated to set multiple entities to specific states simultaneously. Unlike automations and scripts, scenes don’t have complex logic - they simply set states.

Scene Structure

Scenes are entities with the domain scene and are implemented in homeassistant/components/scene/.

Scene Entity

The base scene class extends RestoreEntity:

Key Properties

  • entity_id: Format is scene.<scene_name>
  • state: ISO timestamp of last activation
  • entities: Dictionary of entity states to set

Defining Scenes

Scenes can be defined in multiple ways:

YAML Configuration

Home Assistant Platform

The built-in platform allows dynamic scene creation:

Scene Service

Create scenes dynamically using the scene.create service:
Or specify exact states:

Activating Scenes

Turn On Service

Scenes are activated using the scene.turn_on service:

From Automations

From Scripts

Scene Entity States

The state of a scene entity represents the last time it was activated:
Scenes maintain their last activation timestamp, which is persisted across restarts.

Transition Support

Some entity types support smooth transitions when activating scenes:
Transition is primarily supported by:
  • Lights
  • Some media players
  • Smart switches with dimming

Scene Components

Base Scene Class

Scene Class

Dynamic Scenes

Create scenes programmatically using the scene.create service:

Snapshot Current State

Later, restore the scene:

Specify Exact States

Scene Best Practices

Meaningful Names

Use descriptive names that clearly indicate what the scene does.

Complete States

Include all relevant entities to ensure consistent scene activation.

Test Transitions

Test transition times with different entity types to ensure smooth changes.

Scene Snapshots

Use scene.create with snapshot_entities to capture current states before changes.

Integration with Other Components

With Automations

With Scripts

Scene Triggers

Scenes can be used in automation triggers:

Comparing Scenes, Scripts, and Automations

Platform-Specific Scenes

Some integrations provide their own scene platforms:

Scene Services

scene.turn_on

Activate a scene:

scene.create

Create or update a scene:

scene.reload

Reload scene configuration:

Scene Storage

Scenes maintain minimal state - primarily the last activation timestamp:

Common Use Cases

Home Theater

Work Mode

Departure

Automations

Use scenes in automation actions

Scripts

Incorporate scenes into scripts

Service Calls

Learn about the service system

State Machine

Understand entity state management