Wake-up light alarm with sunrise effect

Anyone got good suggestion for the bulb which starts from very low light. Ikea bulbs arn’t good for this, they are too bright even in lowest setting.

Someone used it with an iPhone? Because I don’t have the “next alarm” sensor…

I have an iPhone and sync my working hours to my calendar, is there any way you can implement that I can have a event trigger instead of time stamp?

I have tried to figure out how to produce a time stamp entity from calendar but with no luck.

Any one that have any pointers?

1 Like

This Wake-Up-Automation is awesome! Thanks for your work.
I don’t always stay up at the same time. Is it possible to adjust the Wake-Up-Time on the “Homescreen” of my HA? I tried with a Time-Helper but as you explained, it doesn’t work. A Date&Time-Helper work but it isn’t nice to change the Date every Day. Any Ideas how i can solve this?

I currently use the innr zigbee bulbs which dim to a fairly low light. I have 2 colour temperature varying ones in our bedside lights that work quite well.

I’m fairly new to HA, but I found a possible solution to your issue. The below reference is a way to set the time helper to a timestamp. However, I did also have to use an automation to update_entity at 2:30 each morning.

I have tried the solution from deathbybandaid but newer got them to work.

I use the today_at function which creates a sensor with todays date. You can then create an automation or a trigger to update the sensor at a given time.

- sensor:
    name: "Alarm tid med dato"
    device_class: timestamp
    state: "{{today_at(states('input_datetime.alarm'))}}"```

I left a comment on the blueprint thread that is relevant here. I’m in the process of finding a replacement for my code editor that I actually like to code in (I write python mostly), and would love some help achieving some of my goals in a fork of the blueprint.

This is essentially what I’d like a dashboard for my wife to look like, We have 3 kids with completely different morning routines (3 schoolbus pickup times, over the span of 3 hours!), and I’d like her to be able to easily adjust a few things without having to learn HA at all. I’m working out some quirks before migrating from a Hue Bridge.

image

template:
  - sensor:
    - name: timestamp_sam_work_wakeup_time
      device_class: timestamp
      state: "{{ today_at(states('input_datetime.sam_work_wakeup_time')) }}"

  - sensor:
    - name: timestamp_sam_work_wakeup_time_start
      state: "{{  (today_at(states('input_datetime.sam_work_wakeup_time')) - timedelta(minutes=(states('input_number.sunrise_wakeup_time_duration_sam_work')|int))).strftime('%-I:%M %p') }}"

I then have a couple helpers for setting a time, and possibly a duration if I can figure out how to modify the blueprint.

I then had to add an automation to update_entities whenever a the duration or the time has a change. I also have a trigger for 2:30AM to make sure the today_at gets modified before I need to wake up.

Edit: It’s on my list to try and add some logic to the template sensors to determine if the time helper time is already passed for the day.

Also, it would almost be TOO HELPFUL if HA were to have a built-in scheduling/caldav service. HA could then allow us to use a UI to add calendar events with recurrence, with entity objects that expose datetime versus timestamp. Calendar entity for next_event would also be incredibly useful. A calendar system could then incorporate auto-adjustments for stuff like Holidays, or other dates that a workplace schedules off (for instance, where I work, I get Thanksgiving AND the Friday after off). With a calendar system, it would also be able to modify a single instance of a recurring event and remove a single occurance when needed,

I want to use this automation with a light that used the WLED integration.
I’m using a Wemos d1 mini with a ws2812 ledstrip inside a diy 3d printed moodlight.
Unfortunately it’s currently not working, can someone make it compatible with WLED ?

Thank you for the nice blueprint!

I wanted to trigger the wake up based on a schedule. For now I dont need any fancy UI.

What I did is make use of the Schedule helper integration:

This helper has an attribute next_event which can be used to trigger the wake up automation. However, next_event is an attribute and not of device_class: timestamp. With a template sensor you can convert the timestamp:

template:
  - sensor:
    - unique_id: bedroom_alarm_schedule_next_event
      name: Bedroom alarm schedule next event
      device_class: timestamp
      state: "{{ state_attr('schedule.bedroom_alarm', 'next_event') }}"

Now this template sensor can be used for the input Alarm timestamp sensor.

1 Like

Is there any way to adjust the color temperature to the current sun’s temperature for my location?

1 Like

I just forked the original and did this modification. You should be able to import this version from:

I have also strange problem with Ikea gateway and bulbs. This blueprint turns light on and then immediately off. So if automation based on this runs, end result is light turning off even if light is on before.

And for some reason it also turns light off if I try to start the light with automation bit after the wake-up automation has started.

History from the light:
07.05.00 - Turned on (wake up light automation)
07.05.00 - Turned off (wake up light automation)
07.05.10 - Turned on (automation to turn on the bulb after wake up light is running)
07.05.12 - Turned off (wake up light automation)

Edit: and I’ve searched the code and there should be only turn on -stuff in there so this is pretty mysterious…

I’ll reply to myself. It seems to be the blueprint sending mireds to the light that causes Ikea lamp to turn off. Any color_temp below 2200 will shut the lamp down.

I’ll try to modify updated version that fixes this one for IKEA lights today, no promises etc. Will edit this post if I succeed.

Hello Timo,

Thank you for the reply.
I was middeling a bit with this code already but I was setting up a new server so did’t figure it out yet.
I tried the code you posted earlier but I still cannot get it to work.
I saw that you where stil editing the code.

When I copy past the code I get Message malformed: required key not provided @ data[‘action’].

i will look into I a bit more (iam still a newbie when it comes to coding), maybe you can point me in the right direction :slight_smile:

Sorry about that, I am currently trying to figure out also fix for Ikea lights and this is why my gist is currently not functional. Running tests currently and I can let you know when I get it at least somewhat working.

Or you can start by creating a github account if you don’t already have one, fork the original gist and edit your own version in browser and use your own version of the blueprint :slight_smile:

I think I got my version working and sending Kelvins instead of mireds. But no luck, still same behaviour. Needs further investigation at some point.

Something that caught my eye, translated so it will not be fully accurate in english:
Turned off by automation “Wake-up light alarm with sunrise effect” executed because of time pattern

Sorry, you should not use my gist for time being, it will not help and might cause further issues.

This is bit embarassing, but I found something potentially useful when staring again the code:

description: ‘The brightness to start with. Some lights ignore very low values
and may turn on with full brightness instead!’

But actually this was the thing causing issues with light not turning on at all. So the description should be “may turn on with full brightness or turn on and immediately off again” or something similar.

Changed settings to 3 or similar value and now it works! Please forget my gist I linked previously because that is in fully broken state and completely useless.

I can happily recommend the Shelly Duo bulbs.
I have several myself and they work great from 1-100% brightness.