Wake-up light alarm with sunrise effect

Hmm… For some reasons I’m unable to get it working :frowning:

alias: Wecker
description: Wake-up light alarm with sunrise effect
use_blueprint:
  path: sbyx/wake-up-light-alarm-with-sunrise-effect.yaml
  input:
    min_mired: '0'
    light_entity: light.licht_bett_schlafzimmer_felix
    manual_time: '21:15:00'
    sunrise_duration: '5'
    start_brightness: '50'
    end_brightness: '254'
    check_entity: none

The light bulb stays dark. I enabled this automation 5-10 min before the configured time. No log entries, and date_time_iso shows me the correct values.

could you tell us in more detail how you implemented this.
command link is not working

if you create a input boolean, then you only need to add one condition

   - condition: template
     value_template: '{{is_state (' 'input_boolean.wakeup_' '~ [' 'monday' ',' 'tuesday' ',' 'wednesday' ',' 'thursday' ',' 'friday' ',' 'saturday' ',' 'sunday' '] [now (). weekday ()],' 'on' ')}}'

2 alarm entites is no problem ? Or do i need to make 2 automations for this ?

Sure, but if you need a few alarms then it’s more code that you need. From the perspective of the beginner, having this in the blueprint may be easier.

If you’re looking for a Sunrise tracking Sensor that can pull the correct ISO/UTC format to be parsed by as_timestamp in OP’s code, here is one way.

Add this sensor to your configuration.yaml file and manually input it (sensor.nextsunrise) when creating the automation:

sensor:
  - platform: template
    sensors:
      nextsunrise:
        entity_id: sun.sun
        friendly_name: 'Next Sunrise'
        value_template: >
          {{ state_attr('sun.sun', 'next_rising')  }}
        icon_template: mdi:weather-sunset-up

Damn this is exactly what I needed, thank you!!
I had no idea _next_alarm was an option, I love it!

I created a boolean switch to turn it off, I might add a location zone.
My led strip is RGB, as a pre-sunrise action the MQTT publisher will set the colors to 255 and the state to OFF so the automation can take over

Still have to check if manual alarm time is ignored if the timestamp sensor is set, but it seems like it will be

Is there a possibility to set the alarm with my google home hub (Alarm @ my bedside) to use this?

I have some scripts to do it but the setup is painful. However there seems to be a HACS extension here: https://github.com/Drakulix/googlehome
Haven’t reviewed or tested it yet but looks promising at first glance.

Thanks @Sbyx for sharing this blueprint.
I just downloaded it and hope to wake up with a nice sunrise in my room tomorrow morning.

Greetz,
Boris

Edit: typo

Great Job, Thank you for this awesome Blueprint

Hi, i just tested the Blueprint and it works nice. Thanks for this :slight_smile:

But am i right that it is NOT using colors?
Just from warm white to cold white? Is it planned to support color bulbs?

Greetings

Hi
The blueprint works for me, but now i want to add a Feature to my lovelace whit a manual timer anybody knows what i have to add in my ui to change the time setting in this blueprint?

Hi, the blueprint is amazing. Just one Idea. I’m using an WLED LED Strip. Do you think you could add an option to set the effect to the WLED Sunrise effect?

1 Like

Not sure what is necessary to make use of WLED strips. They don’t support setting color using temperature?

@n0nk What would be the expected outcome would be with colors? A lot of color lights also support color temperature which actually starts with very red-ish color (i.e. like an actual sun-rise) and then transitions to daylight white.

@Ctyd Create a date-time helper in HA settings and note down its name (input_datetime.XYZ). It needs to be a helper with BOTH date and time. Set the newly created helper as timestamp sensor in the blueprint automation. Enter manually the name noted down earlier including the input_datetime prefix. Note: You may not be able to select it in the drop down but manual input should work. You can add the input_datetime helper to the UI.

Hey,

i am using a Hue White and Color which works with your blueprint but it does not start red “enough” in my opinion, this is why i asked. I want to get a result like this show in the video --> https://www.youtube.com/watch?v=AYmfEdJmfbE

I am currently trying to add this but i never worked with a blueprint before so this will take some time :slight_smile: I will try to add the colors for the first 30-50% of the brightness and then “switch back” to your solution

ahh ok, thx for answer i dont try to manual add it.
With this helper i has to edit it every Day because the date in the Helper? or do i only need to change the Time of the Helper?

i Handle it with the Helper, here is my Way, I created a Helper with Date/time and i only want to edit the Time from The Helper and dont to edit every Day the Date from The Helper.

I maked an Autmation that calls every Day at the sametime this Service:

service: input_datetime.set_datetime
target:
entity_id: input_datetime.zeit_kinder_aufstehen
data:
date: ‘{{ now().strftime(’’%Y-%m-%d’’) }}’

with this i can only change the time from The Date/Time helper in the Lovelace UI and dont has to change the Date every Day.

1 Like

Hi guys,

Weird things happens…
After update to 2021.3.4, wake up is triggered, quite randomly, BUT alarm is set to regular morning hour. For example, now it’s triggering every minut, but even if triggered, it does not goes brighter and brighter. It’s always on minimum.
During normal time, it works OK so light starts to increase as it should.
Any idea??

You can already use the “pre-actions” to turn on the light as red with 1% brightness then use the turn_on service to do a long transition to the warmest white that will be the starting point of the blueprint. In my case, I use a Lifx Z led strip and I will light up individual zones of the led strip to do something even more progressive. :smiley:

Ok, I found the reason.
I made reinstall of companion app and forgot to select only allowed app as alarm sensor. So it was reacting on all apps on the phone.