Thanks so much! I’d just ended up getting to used to light coming on full brightness every morning but this fixed this blueprint for me when used with Adaptive Lighting.
Worked great for me the first time. Just wanted to say thanks! This is the last resort for me with my 14-year-old daughter!
My automation is failing for some reason:
Conf:
Date time ISO is available:
date sensor as well:
Workday sensor also:
Thanks to Sbyx, this worked the first time for me. I have a suggestion and wonder if it could be done or if anyone knows how to suggest I attempt it.
My Hue color bulb came on at 1% with low color temp as advertised, but it instantly woke me up. It’s still pretty bright at 1%. But if the light could be set to all red instead of white, it probably would not. So looking to transition from all red to a very blue white, can it be done?
Were You able to solve this issue?
It seems that it fails at similar place for me, I am using manual time as well, but no additional sensor.
Nope, haven’t tried to troubleshoot and no feedback here as well.
Great blueprint, use it three times for myself and my kids!
I was wondering if it is possible to make an action where the ‘sunrise-program’ stops. For example: When i get up in the morning during the sunrise routine and I turn off the light after leaving the room, the sunrise routine continues, turning the light back on.
Any suggestions on how to fix this?
Thanks in advance!
Did you solve this yet?
I am thinking of something like “if alarm time minus now is smaller then X hours, then don’t trigger”
I don’t have the scripting skills to bring this into the BP
Hi, no I did not get this running yet, my scripting skills are not enough for this. So I dit try the following:
alias: turn off automation wake-up light
description: ""
trigger:
- device_id: XXX
domain: hue
platform: device
type: initial_press
subtype: 1
unique_id: XXX
condition:
- condition: state
entity_id: automation.wake_up_light_07_00_automatisering
attribute: last_triggered
for:
hours: 0
minutes: 0
seconds: 0
state: ""
action: []
mode: single
action:
- service: automation.turn_off
data:
stop_actions: true
target:
entity_id: automation.wake_up_light_07_00_automatisering
mode: single
trigger: pressing a button which also turns off the lights.
Condition: The solution could be to test in the state of last_triggered if the automation was triggerd in the last 30 minutes. But it needs to be compared to this type of state: “2023-12-13T10:24:00.245985+00:00” and that is beyond my skill.
And an action would be to turn off the automation. wait for 60 minutes or so and turn the automation on again.
It’s a bit of a workaround, would be great if a ‘kill-automation’ method was included in the blueprint =D
This blueprint seems very cool! We use Google hubs as alarm clocks - we usually set the alarm by voice control. With the Google home integration, I can see that an alarm has been set and the time. Is it possible to have this automation use that alarm time as the baseline for the sunrise effect?
Actually I just asked Bard to write an automation to do this. Here’s what it came back with:
Home Assistant Automation for Gentle Wake-Up Light
Here’s an automation in Home Assistant that slowly turns on a light before a Google Hub alarm goes off, simulating a sunrise effect:
Trigger:
- Platform:
template
- Value template: “{{ (as_timestamp(now()) > (as_timestamp(states(‘sensor.woonkamer_mini_alarms’)[0].attributes.alarm_time) - timedelta(minutes=15))) }}”
Conditions:
- Platform:
state
- Entity:
sensor.woonkamer_mini_alarms
- Attribute:
alarm_time
- State:
not None
Action:
- Platform:
light
- Entity:
light.bedroom_ceiling_light
- Service:
light.turn_on
- Brightness:
{{ 0.1 * (((as_timestamp(states('sensor.woonkamer_mini_alarms')[0].attributes.alarm_time) - timedelta(minutes=15)) - as_timestamp(now())) / timedelta(minutes=15)) }}
- Transition:
linear
- Duration:
timedelta(minutes=15)
Explanation:
- The trigger uses a template that checks if the current time is 15 minutes before the alarm time set on the Google Hub alarm sensor (
sensor.woonkamer_mini_alarms
) (replace this with your sensor entity name). - The condition ensures the alarm time is available in the sensor.
- The action turns on the
light.bedroom_ceiling_light
(replace this with your light entity name) with a brightness that ramps up from 0% to 100% over 15 minutes using a linear transition. - The brightness calculation uses the remaining time before the alarm goes off to proportionally increase the light intensity.
Customization:
- Adjust the trigger time (
15 minutes
) to change the start time of the light fade-in. - Modify the brightness curve by changing the constant in the brightness calculation.
- Replace the entity names with your actual sensor and light entity names.
- You can add additional actions to the automation, such as playing specific sounds or changing the temperature.
Note: This automation requires integrating your Google Hub with Home Assistant using the Google Home integration.
I hope this helps you create a gentle wake-up experience using Home Assistant!
And in yaml:
automation:
trigger:
platform: template
value_template: "{{ (as_timestamp(now()) > (as_timestamp(states('sensor.woonkamer_mini_alarms')[0].attributes.alarm_time) - timedelta(minutes=15))) }}"
conditions:
- platform: state
entity: sensor.woonkamer_mini_alarms
attribute: alarm_time
state: not None
action:
- service: light.turn_on
entity: light.bedroom_ceiling_light
data:
brightness: "{{ 0.1 * (((as_timestamp(states('sensor.woonkamer_mini_alarms')[0].attributes.alarm_time) - timedelta(minutes=15)) - as_timestamp(now())) / timedelta(minutes=15)) }}"
transition: linear
duration: timedelta(minutes=15)
Hello everyone, I’ve searched high and low, but I haven’t managed to do it yet… I want to use the Timestamp Sensor of this automation, the one I created earlier to synchronize the alarm time from iOS with this (Sync iOS 17 Sleep Alarm to HA). However, with that approach, I create a ‘datetime’ helper with date and time… Has anyone had the same issue and can help me?
I did not. I would like to suggest one change to the logic: “if alarm time minus ‘time when alarm is recorded’ is smaller then X hours, then don’t trigger”.
Other options:
- do not run the automation more than once a day;
- run it only when alarm is within a determined time range.
Other ideas or considerations?
I cannot get this to work with a helper thats only time. Only date and time will trigger it correctly but i’d like to have it trigger everyday at the same time. Change the helper to date and time it triggers flawlessly, only time and it does nothing. Nothing in logfiles.
Configuration.yaml:
Loads default set of integrations. Do not remove.
default_config:
Load frontend themes from the themes folder
frontend:
themes: !include_dir_merge_named themes
homeassistant:
time_zone: “Europe/Amsterdam”
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
helper: !include helpers.yaml
virtual:
fan:
- platform: virtual
name: Office Fan
speed: True
speed_count: 5
direction: True
oscillate:
sensor:
- platform: time_date
display_options:- ‘time’
- ‘date’
- ‘date_time’
- ‘date_time_utc’
- ‘date_time_iso’
- ‘time_date’
- ‘time_utc’
- ‘beat’
Same here. Doesn’t work for me. I enabled the required sensors, but the manual time or manual execution does not work.
@Sbyx can you check if you can fix the blueprint to work again? You would make me and many others really happy
Hi,
Would be nice to add RGB colors for more natural “morning” light - starts from some red colors, then smoothly changes to ~“4000K” color. This is how wake up light works in most of separate devices like Philips Wake-Up light.
I have IKEA bulb, using only temperature color makes light quite unnatural, finishes with too white…
I got frustrated with this not working for me and how difficult it was to troubleshoot so I created my own, simpler, not as full featured, and not as easy to set up version that has worked pretty well for me for the past month or so.
I have this set up with a WLED controled system and everytime it just goes to the last preset I used not the sunrise or slowly light up action. I have made sure that the load at boot is not set and the preset is not set to the default.
thanks, exactly what I was looking for!