Skip to content

Instantly share code, notes, and snippets.

@iceteabottle
Last active April 15, 2025 19:27
Show Gist options
  • Save iceteabottle/0fc19161947dba1e6333723fa5177886 to your computer and use it in GitHub Desktop.
Save iceteabottle/0fc19161947dba1e6333723fa5177886 to your computer and use it in GitHub Desktop.
Lichtwecker (wake-up light) #home-assistant

Lichtwecker (Wake-up light)

This is a blueprint for a wake-up light. The automation slightly increases the brigtness of a light to simulate a sunrise in the morning. The light intensity increases over a user defined period to wake you up gently.

Installation

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

blueprint:
name: Lichtwecker (Wake-up Light)
description: Gradually turns on a light over a specified duration to simulate a sunrise.
domain: automation
input:
light:
name: Light
description: The light to control.
selector:
entity:
domain: light
schedule:
name: Wake-up Schedule
description: The schedule to start the wake-up sequence.
selector:
entity:
domain: schedule
duration:
name: Duration (minutes)
description: The duration of the dimming sequence in minutes.
default: 15
selector:
number:
min: 1
max: 60
unit_of_measurement: minutes
step: 1
trigger:
- platform: state
from: "off"
to: "on"
entity_id: !input schedule
condition:
- condition: state
entity_id: !input light
state: "off"
mode: restart
variables:
input_schedule: !input schedule
action:
- variables:
input_duration: !input duration
total_steps: "{{ (input_duration | int) * 4 }}"
brightness_step_pct: "{{ (100 / total_steps) | int }}"
transition_seconds: "{{ (input_duration | int) * 60 / total_steps | round(0) | int }}"
- service: light.turn_on
target:
entity_id: !input light
data:
brightness_pct: 1
transition: 0
- delay:
milliseconds: 500
- repeat:
count: "{{ total_steps }}"
sequence:
- condition: state
entity_id: !input light
state: "on"
- service: light.turn_on
target:
entity_id: !input light
data:
brightness_step_pct: "{{ brightness_step_pct }}"
transition: "{{ transition_seconds }}"
- delay:
seconds: "{{ transition_seconds }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment