What bulb are you using? Does it support mireds?
Any change you can modify that to gather the “next alarm” info from a sensor?
I don’t always wake up at the same time so I just set my Alexa every night. I know it shares this information with HA so it’s possible to do so, I just don’t have the technical skill to do it.
Check out the first post and link to the blueprint. That one will link to your phone alarm.
What blueprint are you referring to? The original one that inspired your work or your own blueprint?
I’m in same position than @Dumonster, as I would like that the alarm time (and thus also day) is whatever is set in Google Assistant and that is read by Home Assistant with Google Home integration.
yes, the original post
So for some reason this stopped working between when I disabled the automation created by the blueprint at the end of the school year and now. I’ve used the opportunity to refactor both the blueprint and the script so if upgrading you will need to update the script as well.
I’ve switch to using Kelvin as the color temperature and removed some redundant inputs.
Both the script and the blueprint can be found in the github repo.
Thanks for the perfect timing, I’ve been wanting to try this for a while and finally made time for it today. I’ve followed your instructions and will hopefully wake up to the ‘sunrise’ tomorrow with my first ever HA automation.
Thanks for giving us an alternative to the well known and highly used “Wake-up light alarm with sunrise effect”. I’ve had some issues with that blueprint and decided to use yours. So far so good ! This morning it worked like a charm.
Thanks !
This seems to be getting some attention so I updated it to make installation easier. Both the script and automation are now blueprints. See the original post for details.
I liked the script with the fields better
And do multiple lights still work?
I get this error: TypeError: unhashable type: ‘list’
I didn’t consider multiple lights as an input. However, you can probably create a light group and use that in the script/automation to control multiple lights.
This is so awesome thank you.
Im going to create a “Sunrise” light group and test that out.
Hello everyone,
I think I’ve understood the automation/script so far now. The start time has to be set before the actual alarm. And as far before as the sum of the 3 alarm lengths? Right? I have an iPhone and now have a shortcut that sends me the next alarm in HA (so dynamic). Now I would have to manipulate this time to use it in the automation. Wouldn’t it be possible to calculate the start time for sunrise? In other words, 6:00 alarm, so phase 1 10min + phase 2 10min + phase 3 5min = 25min, so the start time would be at 5:35. Wouldn’t that be easier in general? Or have I misunderstood something?
And thank you very much for the great work so far
This automation is not linked to your phone / HA app whatsoever. It is just a sunrise effect. You need a datetime helper to start it at the time when you would like it to turn on and start getting brighter. How long it takes to get through all the steps and the timeout at the end is up to you.
You should consider there is no actual audio alarm associated with this blueprint. The idea is that the sunrise is queuing your body to wake up naturally, so you’re you’re not jerked awake by an annoying audio alarm. However, until you get used to it, I’d set an audio alarm as a backup.
I have a time and a template helper to do what you want:
time:
template:
{{ (states('sensor.dave_s_s22_next_alarm') | as_timestamp
- state_attr('input_datetime.daves_next_alarm_offset', 'timestamp')) | as_datetime | as_local }}
I can look into changing how the trigger works if this is what the majority wants. It shouldn’t be to difficult to accomplish. I was thinking the below where the trigger time would be calculated by subtracting rise 1,2,3 and timeout would be after the the set datetime sensor is set for.
Example:
on and rise 1 | rise 2 | rise 3 | datetime sensor | timeout
-10 | -10 | -10 | 7:00 | +10
I think it would complement your blueprint nicely. Maybe two input fields or a checkbox depending on how you want to use the time, either as a start time or as an end point.
My idea is based on the fact that I want to be woken up dynamically by the light and then in an “emergency” the normal alarm clock will still go off. Apple has the Health app which doesn’t wake you up like a normal alarm clock and I think a light alarm clock would be a great addition to that.
Thanks Dave, but it would be ideal if it worked like that
Looked into the configuration in my post above and found that you cannot template a time or time_pattern trigger, so doing the math for the sunrise effects and trigger based on that is not done easily. It could probably be done, but it would get inconviently complex.
Easiest way would be to create a second calculated input_datetime helper which is set by the blueprint after it has been set up with alarm input_datetime helper. You would need 2 datetime helpers for each instance of the blueprint with alarm times.
Thanks for this nice blueprint. I’ve got it up and running.
Now I’m trying to change it a little bit to get a sunset animation… But I’m struggling as it seems that it is not that easy to just change the target brightness and temperature in reverse.
Do you have any hints on how to achieve a sunset?