Wake-up light alarm with sunrise effect

Weirdly enough I have Ikea GU10 white range bulbs and they stay on the very warm side.
I have set them to start at 2200 kelvin but at the end when alarm rings the bulbs are only at around 2700 kelvin. I want them to reach their coldest temperature of 4000 kelvin but there is no setting for max temperature and I don’t understand why they stop at 2700 kelvin.

Update: I use Adaptive Lighting. I had previously set to run the service Adaptive Lighting manual control in pre-run, yet as mentioned it was not working correctly.
Now, in the settings of running that service, not only I have set in ‘entity_id’ field the Adaptive Lighting switch that controls my Zigbee light group, but now I also listed every single light of that group in the second optional ‘lights’ field of the service and now it seems to work.

Did you get it working? It works for me very well.

Yesterday i updated home assistent and it tolld me to delete some valeu from the time sensor and now this is not working annymore.

How to solve this?

Hi there,
I am new to home assistant. Found your blueprint and tried it. It looks very promising but I am experiencing the following reproducable glitch: Everything works as expected when I set sunrise duration to 5min (Minimum Brightness=10). But when I set sunrise duration to 10min or above then the light will initially turn on dimmed and warm as expected but after a few seconds it will increase brightness to maximum and cold white. I tested it both with a phillips hue color ambiance and Ikea tradfri color LED, same behaviour. Maybe it’s because they are both RGB bulbs? I am unable to help with the code but glad to test everything.

Hi
Noticed errors in automation:
2024-03-05 10:17:00.105 ERROR (MainThread) [homeassistant.components.automation.aufwachen_szene] Error while executing automation automation.aufwachen_szene: In ‘template’ condition: ValueError: Template error: as_timestamp got invalid input ‘unknown 06:30:00’ when rendering template ‘{{0 < as_timestamp(states(sensor) if sensor != ‘none’ else states(‘sensor.date’) ~ ’ ’ ~ manual_time) - as_timestamp(states(‘sensor.date_time_iso’)) <= float(seconds) and states(check_entity) in [‘unknown’, ‘on’, ‘home’]}}’ but no default was specified

Looks like as_timestamp needs a default.

Added some defaults an works now.

120c120
<     ~ '' '' ~ manual_time, default=0) - as_timestamp(states(''sensor.date_time_iso''), default=0) <= float(seconds)
---
>     ~ '' '' ~ manual_time) - as_timestamp(states(''sensor.date_time_iso'')) <= float(seconds)
148c148
<       ~ '' '' ~ manual_time, default=0) - as_timestamp(now()) <= float(seconds)}}'
---
>       ~ '' '' ~ manual_time) - as_timestamp(now()) <= float(seconds)}}'
157c157
<           ~ '' '' ~ manual_time, default=0) - as_timestamp(now()) <= float(seconds)}}'
---
>           ~ '' '' ~ manual_time) - as_timestamp(now()) <= float(seconds)}}'
1 Like

how can this blueprint be triggered with an webhook.

I have a webhook activated by my phone when the alarm “name” is fired

Just trying this out for the first time!

Sometimes I am already up with lights on before my transition is due to start, in which case it’s jarring for the lights to drop back down and start (which happens e.g. with a standard Hue automation).

To get around this I’ve created a Boolean toggle helper and two automations that switch the helper off if the lights are on, and vice versa.
I’m using this helper entity in the condition section (so if it’s “on” which means my lights are off, the automation will run).

Then I have one request: I plan to use the time manually for now.
Is there a way to be able to quickly view and edit the manual alarm time on HA dashboard, without having to go into and edit the automation?
Perhaps something with building blocks? (I’m not too sure - I’m a newbie having installed HA for the first time a few days ago!)

nvm. readded „time_date“ options and worked again

Govee has a limited amount of connections with server. that’s why it isn’t working

can you share the boolean helper? I was looking for the same!
To set the time manually just need to add an alarm entity and use a similar card like this one:

type: custom:mushroom-entity-card entity: input_datetime.sveglia icon: mdi:alarm fill_container: true

Hi t0kn4r,
what do you mean by nvm
and readded “time_date” where?

thanks in advance.

I was configuring something related to this blueprint today and thought I’d just chime-in to say “Thank you” to @Sbyx as I’ve been relying in this little gem for a couple years now to ensure my kids wake-up nice and fresh :slight_smile:

One minor tweak I did around the check_entity configuration: for each of my kids I’ve created 8 inputs, an overall “wake up alarm enabled” and one additional one for each day of the week, than I have a little section on their dashboards where they can tweak it like this:

image

This gets around some oddities like my son having his Monday’s classes in the afternoon instead of morning. Also, on the occasional holiday during the week, all it takes is to flip the “enabled” switch off.

The entity to check is templated as follow: (it basically builds an entity ID by adding the day of the week to a fixed prefix, and gets the state of the switch that day. This is ANDed with the global “enabled” flag)

  # determine if Rafael's wake-up light should run today:
  - platform: template
    sensors:
      rafael_wakeup_should_run:
        value_template:  >
          {% set sensor_names = [ 'monday', 'tuesday', 'wednesday','thursday','friday','saturday','sunday'] %}
          {% set today_name = sensor_names[now().weekday()] %}
          {% set entity_id = 'input_boolean.rafael_wakeup_'+today_name %}
          {{ is_state('input_boolean.rafael_wakeup_enabled', 'on') and is_state(entity_id, 'on') }}```
3 Likes

Hello, since a couple of weeks I’m having issue with the automation trigger.
I created a helper: input_datetime and a card on lovelace from where I can set a specific time and date.
On the automation trigger part (at the very beginning) I’m not able to find my helper entity which is correctly defined with device class: timestamp in configuration.yaml.
Any help please?

This has stopped working for me, and I’ve made no changes.

It starts, but then will stop at random points in the process or compete all automations. There seems to be no rhyme or reason (typical for HA).

I’m having an issue where if the automation is running, and I use a switch to turn off all lights, they turn back on a second later. Does anyone know why this might be? They seem to behave correctly if I turn them off from the Home Assistant app i.e. it stops the automation and they remain off.

Thanks for this! Bit of a GOTCHA!

Make sure you add the date sensor and the date_time_iso sensor.

Thanks for the card info, that’s helpful!

Here’s my boolean helper, created in the “Devices & Services” → “Helpers” section of settings

And here’s my automations:

I could have done this in one automation with “When Bedside Lamps is toggled… toggle Bedside Lamps opposite state” but I wanted to eliminate any error e.g. accidentally manually changing the state of the helper.

I’ve noticed the same at least a couple of times when I switch of my lights with a Hue controller switch. Perhaps it’s something to do with the order of commands received by HA?
e.g. it takes a moment for HA to receive the command of the physical switch press, but the automation already started processing the next step up in brightness and mired in that time, then it executes the switch off, but then it executes the next step up that had already started processing.

The couple of times I’ve experienced this, I’ve found that pressing the switch a second time successfully switched the lamps off.

Hmm, you may be right. It does seem to work after a while but I’ve found sometimes I have to do a dance of turning it off quite a few times until they stay off, which isn’t really what you want first thing in the morning.

Hi @samumar, after reading your post about the dashboard card to control the alarm time, I stumbled across the same issue after creating the input_datetime helper - it wasn’t showing up in the list in the “Alarm timestamp sensor” section.

I realised this is because the automation is looking for a sensor, not an input_datetime entity.

I fixed this by creating a sensor which reads the input_datetime helper. I created the sensor through adding the below code to my configuration.yaml (first I tried to create a template sensor helper, but I couldn’t get the syntax right).

template:
    # Create a sensor for the Wake Up Alarm automation to read the input datetime from the dashboard
    sensor:
        name: "Wake Up Alarm"
        unique_id: template_se_alarm_01
        state: "{{ (states('input_datetime.wake_up_alarm') | as_datetime | as_local).isoformat() }}"
        device_class: timestamp

Now the created sensor appears in the automation :slight_smile:

Hope this helps you!