Skip to content

Instantly share code, notes, and snippets.

@Rspurdy
Last active January 4, 2026 01:52
Show Gist options
  • Select an option

  • Save Rspurdy/4e0c3ae734aa8a878a5d98e3c61580d8 to your computer and use it in GitHub Desktop.

Select an option

Save Rspurdy/4e0c3ae734aa8a878a5d98e3c61580d8 to your computer and use it in GitHub Desktop.
Timer
blueprint:
name: Scheduled Individual Dimming
description: >
At a set time, runs a custom list of actions (allowing you to set individual
brightness levels for unlimited lights). At a second set time, turns a
master list of lights off.
domain: automation
input:
# --- TIMING ---
dim_time:
name: Time to Dim
description: When should the lights adjust to their dim levels?
selector:
time: {}
off_time:
name: Time to Off
description: When should the lights turn off?
selector:
time: {}
# --- THE DIMMING LOGIC ---
dimming_actions:
name: Dimming Configuration
description: >
Add an action for each light here.
Example: Add Action -> Light: Turn On -> Choose Light -> Set Brightness.
Repeat for as many lights as you need.
selector:
action: {}
# --- THE OFF LOGIC ---
lights_to_turn_off:
name: Lights to Turn Off
description: Select all the lights involved above so the automation knows what to turn off.
selector:
target:
entity:
domain: light
off_transition:
name: Off Transition
description: Seconds to fade out when turning off.
default: 5
selector:
number:
min: 0
max: 300
unit_of_measurement: "seconds"
trigger:
- platform: time
at: !input dim_time
id: "dim_event"
- platform: time
at: !input off_time
id: "off_event"
action:
- choose:
# --- RUN THE CUSTOM DIMMING LIST ---
- conditions:
- condition: trigger
id: "dim_event"
sequence:
- choose: [] # Placeholder to ensure structure
default: !input dimming_actions
# --- TURN EVERYTHING OFF ---
- conditions:
- condition: trigger
id: "off_event"
sequence:
- action: light.turn_off
target: !input lights_to_turn_off
data:
transition: !input off_transition
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment