Phillips Hue Wakeup Light with fade-in

Hum…

Can’t seem to get this to work, or even figure out where it is crashing.

I have *.automations on Debug level, and this is all I’m getting:

018-05-25 16:38:01 INFO (MainThread) [homeassistant.components.automation] Executing WakeUp Light Bedroom

So it is running, but not actually doing anything. I did add the date sensor, but that didnt help. I also (obviously) changed the name of my light group for Hue.

Any thoughts on how to debug / trace the issue?

**EDIT:
Ha! found the issue in the last place I look… the info “button”. I renamed the script section while testing and that was the issue. Works great! Thanks!

I have the same issue… any ideas?

Nope… Not working

Might be a silly question but why don’t you try the built in routines in the Hue App? Seems to be possible natively to smooth in at wake up ? And very reliable too…

1 Like

It’s too simple and not integrated :slight_smile:

I want to trigger other stuf at the same time after my alarm goes off (connected to HA).
My alarm goes off a different time everyday.

@dvbit @VGE

sure, you’re both right, Hue automation is quite simple, and coming from Hassio or Ha quite a leap back in possibilities. Still people are creating the labs, which we can use native, and I believe also through the api, hence via Ha. Switching my motion sensors like that too, works super.

Hue has it advantages in stability and most of all reliability compared to Ha though. Thats why I always try to use the Hue native services/lights/sensors etc and call these in the Ha setup if needed.

I havent tested the labs. Any good ones? Will read on it this weekend. Maby its a solution to my problem.

mostly christmas lights, fake thunders and other flashes.
in the regular routines you might find wake up strategies.

also just so you know theres the circadian lights settings by @mastermarkush adapting the lights to the circadian settings of the day Circadian light with Philips Hue, independent from world clocks ;-) Nice!

I was joking but… my plan is the following:
I have two sensors on both sides of my bed turning on courtesy lights when we wake up / get out of bed.
So meant to 1)
Turn progressively louder some soft music through google mini .
2) if I wave my hand in front of the sensor or shout at the mini ok google snooze (least effort strategy: first scenario my partner is in bed and sleeping. Second I am alone :slight_smile:
3) I stop the hand on the sensor for a few seconds or tell the mini to stop: stop the alarm. I have to figure out if it is possible to check this gesture somehow. Any idea welcome. Other option would be,perhaps even better, to use a bed occupancy sensor and turn the snooze in a turn off if any of the occupants leave the bed.

Next step: turn on the Nespresso and brew the Coffee :smiley:

Try that with hue :wink:

love this integration, and just started to play with it,
thinking it would be great to be able to set it up with different lamps. is that possible?
either to change lamp with a switch? or do i need to do a separate configuration with everything?

i try to intrgrate this in my HA. It is not working for me. As you van see the sensors fade-in start and duration and alarm time do not work. afbeelding

I also can’t get the script to work. I think the input_numbers are not getting there state pass over to the transision part in the script. The light do go on with brightness 1 but don’t get brighter.

I think it has to do with the last part afbeelding
There the transition time is set but maybe this is wrong?

@iantmn
Hey there. The script still works. I just tried it with success.

Use this updated script as a starting point and paste into your config.yaml file. Test it to make sure it works. You may need to add the time and date sensor to your file as well if you do not already have it.

After I confirm it working, I moved parts of the code to their own file for easy management.

@Lorentz
I would love to see an addition to the script with turning off the lights after it has been turned on at x time. This is a feature in the Phillps Hue app as well.

1 Like

This looks great. Would it work with non hue lights?

Sure does. Using it on an ikea E26 bulb. I am not using the Ikea gateway but the Hue bridge if that makes a difference.

transition: '{{ (( states.input_number.bedroom_rear_wakeup_duration.state

where is this bedroom_rear_wakeup_duration coming from ? i don’t understand the code…

Its an input helper, just letting them parameterise the transition length. If you have a length in mind, you can specify that as a number (in seconds) rather than use a braced template.

Can somebody just tell me what code I have to put in what file ? because I don’t understand it.

I have been using this script for awhile now. It stopped working after upgrading to 2021.12.0 (now on 2021.12.3). Anyone have same issue?

Error:

wakeup light bedroom: Error executing script. Unexpected error for call_service at pos 1: 400, message='Bad Request', url=URL('https://192.168.1.80/clip/v2/resource/light/146a43a2-39a0-445b-8474-4f9285b1d28b')
6:00:00 AM – (ERROR) Automation - message first occurred at 6:00:00 AM and shows up 2 times
Wakeup lighting, smooth transition: Error executing script. Unexpected error for call_service at pos 1: 400, message='Bad Request', url=URL('https://192.168.1.80/clip/v2/resource/light/146a43a2-39a0-445b-8474-4f9285b1d28b')
6:00:00 AM – (ERROR) Script

hey there :slight_smile: I have a much less complex approach, however, I am a YAML noob and seem to still have some issues understanding the workings. I have modified the code below, but not completely written myself, all credit goes to @jpeddicord on twitter and his blog: peddicord_blog

What I have is (this works 100% reliable):

sunrise_wake_up:
  alias: Sunrise wake-up
  sequence:
  - service: light.turn_on
    entity_id: light.sofa
    data:
      color_temp: 500
      brightness_pct: 1
  - delay: '9'
  
  - repeat:
      count: 30
      sequence:
      - service: light.turn_on
        data:
          brightness_pct: '{{ (repeat.index) * 2 }}'
          transition: 8
        entity_id: light.sofa
      - delay: '9'

  - service: light.turn_on
    entity_id: light.window
    data:
      color_temp: 400
      brightness_pct: 40
      transition: 12
    
  mode: single

But what I would like to add:

  - service: light.turn_off
    delay: '45'
    entity_id: light.window
    
  - service: light.turn_on
    entity_id: light.edge_tv
    data:
      color_temp: 400
      brightness_pct: 40
      transition: 12
      
  - service: light.turn_on
    entity_id: light.edge_sofa
    data:
      color_temp: 400
      brightness_pct: 40
      transition: 12
    
  mode: single

However, the whole code together breaks and does not work, the loop does not even start… Could someone please let me know how I need to add it, if possible make a post with how the single file should look so I can copy it?

Many thanks in advance
Marco Leder

1 Like