Researched from current Home Assistant documentation on September 26, 2026. The configuration below is an illustrative worked example, not a Tara hardware test. Menu wording can differ by installed version. The cover is an AI-generated editorial illustration.

Scenes vs scripts: start with what the routine must do

When choosing between Home Assistant scenes and scripts, decide whether you need a saved setting or a reusable procedure. If you only want “dining light at 40%, sideboard lamp at 15%,” create a scene. If you also need “only when this routine is allowed,” or a sequence with waiting between steps, use a script. Add an automation when a clock, sensor or other event should start it.

You do not need all three for every job. One automation can check a condition and turn on a light directly. Introduce a script when you want to call the same behavior from several places, and a scene when a named preset makes the settings easier to maintain. Home Assistant’s concepts guide and automation basics explain these building blocks.

An entity is a particular control or reading inside Home Assistant, such as one lamp’s control. An action is a command, such as applying a scene. In the example below, two light entities keep their settings in one scene, while two ways of starting dinner lighting share one script.

On a phone, scroll the table sideways.

What you wantStart withWhy
Recall different brightness settings for several lightsSceneOne named preset holds the desired settings.
Run the same checks and actions from more than one placeScriptChange the shared procedure once.
Wait, choose between outcomes, or repeat stepsScript, or actions inside one automationBoth use Home Assistant’s action-sequence syntax.
Start something at 18:30 or on a sensor changeAutomationThe trigger supplies the starting event.
Control several lamps with one on/off or brightness controlLight groupA shared control is a different job from recalling a preset.

For that last case, see light groups versus whole-room targets. You do not need to rebuild a working group as a scene.

Worked example: dinner lighting from a button and a schedule

Suppose you want the same dinner lighting from a dashboard button and an optional daily schedule. One “Dinner lighting allowed” switch should block both. The scene stores the look; the script checks the switch; the automation supplies the time.

Use two dimmable lights already controllable in Home Assistant. Confirm each responds through its normal control first. Select lamps that can safely change while you watch; leave stair, exit and other essential lighting out. These brightness values are examples to adjust for your room.

1. Save the lighting preset

Under Settings → Automations & scenes → Scenes, create a scene named Dinner preset. Include only the two intended light entities. Set the dining light to about 40% and the sideboard lamp to about 15%, then save. Note its entity ID; the examples use scene.dinner_preset. Check the actual ID rather than assuming the name produced it.

Scene creation and live editing can change real lights. Since Home Assistant 2024.12, opening an existing scene starts in review mode; switching to edit mode applies it. Check the mode shown on your version before adjusting anything. See the scene editor instructions and the review-mode release explanation.

2. Create one shared allow switch

Go to Settings → Devices & services → Helpers → Create helper → Toggle. Name it Dinner lighting allowed. A helper is a value stored in Home Assistant, without a physical switch attached. Record its entity ID; here it is input_boolean.dinner_lighting_allowed. Add this helper to your dashboard alongside the routine button so the household can find the pause control. Leave it off while setting up.

This switch will be checked when the routine starts. Turning it on does not itself run dinner lighting. Turning it off afterward does not reverse an earlier change. The Toggle helper documentation describes how this shared on/off setting works.

3. Put the check inside the reusable script

Under Settings → Automations & scenes → Scripts, create a new script. In its menu, choose Edit in YAML, the text form of the same configuration. Paste this complete script, substitute your helper and scene IDs, and save. It belongs in the script editor, not in configuration.yaml.

On a phone, scroll long code lines sideways.

Script: Dinner lighting
alias: Dinner lighting
mode: single
sequence:
  - alias: Check the shared allow switch
    condition: state
    entity_id: input_boolean.dinner_lighting_allowed
    state: "on"
  - alias: Apply the saved lighting settings
    action: scene.turn_on
    target:
      entity_id: scene.dinner_preset

The first step stops the sequence unless the helper is on. Put this check inside the script so every caller uses it. A condition placed only in the scheduled automation would not protect a separate dashboard call. This follows Home Assistant’s script condition behavior.

Confirm the saved script’s entity ID; below it is script.dinner_lighting. Its single mode declines another call while that script is still executing. Because this example is short, it is not a lasting cooldown or a lock against other routines. The script documentation explains execution modes.

4. Have both entry points call the script

Add a dashboard Button card. Set its tap action to perform the saved Dinner lighting script. This optional card configuration goes in the card’s code editor:

Dashboard button configuration
type: button
name: Dinner lighting
icon: mdi:lightbulb-group
tap_action:
  action: perform-action
  perform_action: script.dinner_lighting

For an optional schedule, create a new empty automation and open its YAML editor. This example requests the routine daily at 18:30 in Home Assistant’s configured time zone:

Optional scheduled automation
alias: Dinner lighting at 18:30
triggers:
  - trigger: time
    at: "18:30:00"
conditions: []
actions:
  - action: script.dinner_lighting
mode: single

Replace the script ID in both places if yours differs. Save the automation, then disable it until you finish testing. The dashboard action documentation and time-trigger reference describe these settings.

Both routes must call the script. A button that activates scene.dinner_preset directly skips the allow check. The scene remains available separately; the helper only governs callers that use this script. If you want an intentional “apply anyway” button, label that behavior clearly.

5. Verify the two routes without waiting until dinner

Set the lamps to visibly different starting settings, such as both at 70%. Watch them while testing. Use the dashboard button, then the automation’s Run actions command. That command bypasses the automation’s trigger and top-level conditions, but the called script still executes its own condition. It does not prove that the time trigger works. See Home Assistant’s testing guidance.

Expected results from the example’s logic, not measured hardware results.

TestExpected resultIf it differs
Allow switch off; press the dashboard buttonBoth lamps keep their starting settings.Check that the button calls the script, not the scene.
Allow switch off; use the automation’s Run actionsThe script stops at its condition. Lamps stay unchanged.Confirm the automation calls the same script and the condition is inside it.
Allow switch on; try each route separately, resetting the lamps between testsBoth routes request the saved 40% and 15% settings.Check the helper ID, scene ID, script trace and individual lamp controls.
After a successful run, turn the allow switch offThe existing light settings remain.The helper is an entry check, not an undo command.
Change the saved sideboard preset to 25%; repeat both allowed testsBoth routes use the new setting without changing their actions.Check for an old scene ID or duplicated light commands.

Finally, temporarily set the automation’s time a few minutes ahead, enable it, and leave the allow switch on. Confirm it starts at that time; then restore 18:30 or disable the schedule if you only want a button. This simple schedule has no catch-up action if Home Assistant is off at the trigger time.

A trace is a record of the steps Home Assistant ran. Use it to find a failed condition or action, but also watch the lamps: a completed action is not proof that both physical devices reached the requested brightness. Device rounding can also make reported percentages differ slightly.

Keep the boundaries clear as you add more routines

If all you need is a manual lighting preset, keep just the scene and a button. If only one timed rule needs the allow check, its automation can check the helper and apply the scene directly. The extra script earns its place in this example because two entry points share a rule.

The script uses a direct call, action: script.dinner_lighting. If you later add actions after that call, Home Assistant waits for the script to finish. The generic script.turn_on action starts a script without waiting. Neither is a promise that physical lights have finished fading; the calling behavior concerns the sequence running in Home Assistant.

Other routines can still change these lamps after the scene is applied. For a person’s adjustment to take priority over later automatic changes, use an explicit manual-override design. To restore whatever settings existed before a temporary change, use the separate scene snapshot and restore walkthrough. A fixed dinner preset does neither automatically.

Common questions

Can a Home Assistant scene fade the lights?

Yes. The scene.turn_on and scene.apply actions support a transition duration for lights that support fading. A fade is different from waiting and then running another action; use a script or automation for that sequence.

How do I turn off a scene?

There is no scene.turn_off action. Use the light controls or activate another saved preset. A scene records when it was called; it does not continuously track whether the room still matches.

Does stopping a script restore the room?

No. Stopping a running script skips its remaining steps. It does not undo commands already sent. Use ordinary light controls or a saved return preset; capturing and restoring an arbitrary earlier state is a separate setup.

The official scene transition instructions, scene state reference and stop-script action describe those limits.

When planning a home automation kit with coordinated local routines, name the everyday controls and agree on what pauses them. A small routine everyone understands is easier to hand over and maintain.