Create a bright wake-up scene (turn on then gradual light progression over 30 minutes every morning)

Hello! I’m a beginner in home automation and I would like help creating a sunrise scene in Gladys with my 2 Philips Hue bulbs.

That is to say:

  1. Set a time (time easily modifiable via a smartphone app or a sensor on an alarm clock that will send the wake-up time information chosen)
  2. 30 minutes before the time set in the previous step, start a gradual lighting of the bedroom lights, with a progression in the lighting temperature
  3. That the sunrise alarm is active every day of the week, with the possibility of easily disabling this sunrise alarm if needed the night before.
  4. If during the lighting I turn off the light, I don’t want it to turn back on gradually by itself, I want it to stay off, until I press the switch again, and that the light finds its initial power (outside of the sunrise scene)

Thanks for your help

Hi @curing and welcome!

Good news: almost everything in your requirements can be done with a single Gladys scene, without installing anything extra. I’ll break it down step by step, with a small honest reservation about the color temperature at the end.

1. The Trigger (and the time adjustable from the phone)

Two ways to do it, depending on what you prefer:

The simple one: Trigger « Scheduled Trigger » → « Every week », check the days, and set the time to 30 minutes before your wake-up time (wake-up at 7:00 a.m. → 6:30 a.m.). To change the time, open Gladys on your phone and modify the scene. It works, but it’s a bit less practical than an alarm clock.

The more comfortable one: go through your calendar. If you synchronize a calendar in Gladys (CalDAV integration: iCloud, Nextcloud, Synology…) and share it so that it is visible to the scenes, you use the trigger « An event in the calendar is coming up »:

If the name is exactly « Wake-up » and the event starts in 30 minutes

Then you create a recurring event « Wake-up » from Monday to Friday at the time you want to wake up. Changing the time = moving the event from your phone’s calendar, and no alarm tomorrow = deleting the occurrence. Only detail: Gladys synchronizes calendars every 30 minutes, so make your changes the night before, not 10 minutes before.

2. Disabling the alarm the night before

With the « calendar » version, it’s settled above. With the scheduled version, each scene has an activation switch in the list of scenes: you deactivate it in the evening, you reactivate it when you want. Just remember to reactivate it ^^

3. The 30-minute progression

The actions, in this order:

  1. « Turn on the lights » → your two Hue lights
  2. « Control a device » → 1% brightness on each
  3. « Wait » 5 minutes

Then a « step », to be repeated with increasing brightness (for example 10%, 25%, 45%, 70%, 100%):

  1. « Retrieve the last state » → the on/off state of one of the two bulbs
  2. « Condition on variables » → this state = on
  3. « Control a device » → step brightness, on both bulbs
  4. « Wait » 5 minutes (except after the last step)

4. « If I turn it off, it doesn’t turn back on »

This is the role of the « Retrieve the last state » + « Condition on variables » pair at the beginning of each step: if you have turned it off, the condition is no longer met and the scene stops abruptly, it will not turn anything back on. Gladys checks the state of the Hue lights every 15 seconds, so it sees that you have turned it off, even from the Hue app or a Hue button.

For the second part (that the light returns to its normal power when you turn it back on), this is not done in Gladys but in the switch:

  • A Hue button (dimmer, smart button): in the Hue app, set it to recall a scene (« Bright » for example) rather than the last state. Otherwise it will turn back on at the level where the alarm had stopped.
  • A classic wall switch: be careful, if it cuts the power to the bulbs, Gladys can no longer control them in the morning. It must be left in the on position at night. The level when turning back on is set in the Hue app → the bulb → « Behavior on power-up ».

The honest reservation: the color temperature

I looked in the code: Gladys’ Philips Hue integration can control the power, brightness, and color, but not yet the white temperature. An action on it would do nothing. Two workarounds:

  • If your bulbs are White and Color Ambiance, add to each step a « Control a device » on the color: orange at the beginning, then a more and more neutral white. The result is close.
  • If they are White Ambiance (white only), the Hue app has its own « Wake-up » automation that does the temperature fade on its own, but you then lose what Gladys brings (the calendar, the condition « if I turn it off »).

Finally, a small detail: at the very first power-up, the bulb may go back for a fraction of a second to its last level before going down to 1%.

Tell me which model of bulbs and which switch you have, I can help you refine it. And don’t hesitate to post a screenshot of your scene if something doesn’t work :slight_smile:

Thanks a lot! I’m using Hue E27 (white & color) bulbs via Z2M, so I can control the color.

I had done something similar to your suggestion using an AI, and I think it worked last night:

With the first two Z2M messages as follows:

And in the following Z2M, I just vary brightness and color temperature:

With the activity report of the first five minutes:

I wonder if I can’t simplify all these blocks in my « wake up » scene with a « repeat while »? Do you have any ideas? I haven’t managed it yet.