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 domainscene and are implemented in homeassistant/components/scene/.
Scene Entity
The base scene class extendsRestoreEntity:
Key Properties
entity_id: Format isscene.<scene_name>state: ISO timestamp of last activationentities: 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 thescene.create service:
Activating Scenes
Turn On Service
Scenes are activated using thescene.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:- Lights
- Some media players
- Smart switches with dimming
Scene Components
Base Scene Class
Scene Class
Dynamic Scenes
Create scenes programmatically using thescene.create service:
Snapshot Current State
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
Related Resources
Automations
Use scenes in automation actions
Scripts
Incorporate scenes into scripts
Service Calls
Learn about the service system
State Machine
Understand entity state management