Sunrise automation not working (the one by Lewis)

Im trying to get the sunrise alarm by Lewis (Creating Wake Up Sunrise Lights with Home Assistant) to work.
It does turn on the light and increase brightness but waaay to fast, under 10 seconds to full brightness.

I have no clue what could be wrong, transition is set to 900sec

alias: sovrum_väckarlampa
description: ""
trigger:
  - platform: time
    at: input_datetime.vackarlampa
condition:
  - condition: time
    after: "00:00:00"
    before: "23:59:00"
    weekday:
      - mon
      - tue
      - wed
      - thu
      - fri
action:
  - service: light.turn_on
    data:
      color_temp: 350
      brightness_pct: 1
    target:
      device_id: bb348fea2e230be0a5640d82e9f44a29
  - delay:
      hours: 0
      minutes: 0
      seconds: 2
      milliseconds: 0
  - service: light.turn_on
    data:
      transition: 900
      color_temp: 350
      brightness_pct: 100
    target:
      device_id: bb348fea2e230be0a5640d82e9f44a29
mode: single

Which bulb are you using? It may be the case your bulb can’t support the long transition time or the turn on with mimimum brightness.

I would suggest you to go to Developer Tools > Services and call the light.turn_on service with those 2 cases:

  1. Turn on (when the light is off) with 1% brightness
  2. Turn on (when the light is already on with 1% brightness) to 100% brightness with 900s transition

Take note on the results of each call to that service and try to identify what is not working properly.

Then you can play with those values and try to find what fits you well. Some lights will support a long transition directly from the off state, without the need to turn on with minimum brightness first, some lights will require you reducing the transition time or increasing the minimum brightness…

First step works just fine, second step goes to full brightness instantly.

The lamp is an E14-socket zigbee RGB+CT from Lidl, brand “Livarno”

Any bulbs you know can do this properly?
I really want to use light like this instead of my phone alarm.

Philips Hue bulbs seems to all do it.
The alternative is to make HA control the transition.

If you go with having HA control it, then do not use a delay loop, but instead use a input_number helper.
Simple set the input helper to 1 to start with and then have and automation that check if the input_helper is different from 0.
If it is different then wait 9 seconds, increase the brightness 1 and the input_helper 1.
The automation should then trigger again and do the same.
If the input_helper is 100, then set it to 0, which should stop the automation from running again.

The input_helper will keep its value in case anything resets the automations and a lot of things do that.
If that happens, then there might be an extra delay of up to 9 seconds, but it will continue from there and not just stop or maybe restart from 1 again.

Seems to be a bug, see: No transition since 2023.1 · Issue #86646 · home-assistant/core · GitHub

1 Like