Phillips Hue Wakeup Light with fade-in

@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