Apply scene
Use this action to put a group of entitiesAn entity represents a sensor, actor, or function in Home Assistant. Entities are used to monitor physical properties or to control other entities. An entity is usually part of a device or a service. [Learn more] into the states you choose, without creating a scene first. You pass the entities and their target states directly to the action.
This is useful for one-off situations where you don’t need a reusable scene, for example a lighting setup that only ever appears in a single automation.
Using this action from the user interface
If you prefer building automations and scripts visually, Home Assistant walks you through this action step by step. You pick what to target, tweak a few options, and save. No YAML knowledge required.
To apply a set of states from an automation or a script:
- Go to Settings > Automations & scenes.
- Open an existing automation or script, or select Create automation > Create new automation.
- If you’re setting up a new automation, add a trigger in the When section. Scripts don’t need a trigger. They run when something else calls them.
- In the Then do section, select Add action.
- From the search box, search for and select Apply scene.
- In Entities state, list the entities and the state you want each of them to have.
- Optional: set a Transition so the change happens gradually instead of instantly.
- Select Save.
This action does not support targets. In the UI, you are not prompted to choose an area, device, entity, or label. You list the entities in the Entities state option instead.
Options in the UI
The entities and the state you want each of them to have. For each entity, set a state such as on or off, or set a state together with attributes such as brightness or color.
Using this action in YAML
If you work directly in YAML, or you want to know exactly what Home Assistant does under the hood, this section has the technical reference. It lists the field names you use in YAML, their types, and which ones are required.
In YAML, refer to this action as scene.apply. The entities option uses the same format as the entities option of a scene in your configuration:
action: scene.apply
data:
entities:
light.tv_back_light:
state: "on"
brightness: 100
light.ceiling: "off"
media_player.sony_bravia_tv:
state: "on"
source: "HDMI 1"
This dims the TV back light, turns the ceiling light off, and switches the TV to the first HDMI input.
Options in YAML
A mapping of entity IDs to the state you want each of them to have. Use a plain value such as "on" for the state only, or a mapping with a state key and attributes such as brightness or source.
Good to know
- To see which attributes an entity accepts, go to Settings > Tools > States.
- Transitions are only supported by lights, and the lights themselves must support them too.
- If you want a reusable scene that appears in the UI and can be activated from a dashboard, create a scene instead and use Activate scene.
Try it yourself
Ready to test this? Open Settings > Tools > Actions, search for this action, fill in the fields, and select Perform action. You see what happens on your actual entitiesAn entity represents a sensor, actor, or function in Home Assistant. Entities are used to monitor physical properties or to control other entities. An entity is usually part of a device or a service. [Learn more] without writing a line of YAML.
More examples
Real scenarios where this action shows up in automations and scripts. Copy any example and adapt it to your setup.
You don’t need to edit YAML to use these examples. Copy a YAML snippet from this page, open the automation editor in Home Assistant, and press Ctrl+V (or Cmd+V on Mac). Home Assistant automatically converts the pasted YAML into the visual editor format, whether it’s a full automation, a single trigger, a condition, or an action.
Automation: set a movie lighting look when the TV turns on
Dim the back light, switch the ceiling light off, and select the right TV input in a single step.
-
Trigger: Media player turned on
- Target: Sony Bravia TV
-
Action: Apply scene
- Entities state: TV back light, ceiling light, and TV and corresponding states (see YAML below)
Show example YAML
- alias: "Set the movie lighting when the TV turns on"
triggers:
- trigger: media_player.turned_on
target:
entity_id: media_player.sony_bravia_tv
actions:
- action: scene.apply
data:
entities:
light.tv_back_light:
state: "on"
brightness: 100
light.ceiling: "off"
media_player.sony_bravia_tv:
state: "on"
source: "HDMI 1"
Still stuck?
The Home Assistant community is quick to help: join Discord for real-time chat, post on the community forum with the action you’re calling and what you expected to happen, or share on our subreddit /r/homeassistant.
AI assistants like ChatGPT or Claude can also explain actions or suggest the right one when you describe what you want in plain language.
Related actions
These actions work well alongside this one:
-
Activate scene: Activates a scene.
-
Create scene: Creates a new scene on the fly.