In case there wasn’t enough morning lights automation question topics, here’s another one! I’ve looked through several of them and haven’t found a good example of what I’m seeing.
I have the code below set to slowly increase brightness and temperature of a set of lights over 30 minutes (the delay in the code below is normally one minute, it’s set to two seconds for testing). When it runs, it seems to make it through the first few loops, but then gets hung up. The traces are odd too — quickly turning into a stack of “Light turn on…” near the top and “Delay for…” at the bottom, with no “Set Variable” entries beyond the initial one before the repeat block. It also takes way longer to complete than expected — the test I ran before making this, with a two-second delay meaning it should have finished in one minute, is “Still running” 15 minutes later.
alias: Bedroom Lights, 6:00 Weekday Sunrise
description: ""
triggers:
- trigger: time
at: "06:00:00"
conditions:
- condition: time
weekday:
- mon
- tue
- wed
- thu
- fri
actions:
- variables:
temp: 2720
brightness: 10
- repeat:
count: 31
sequence:
- action: light.turn_on
metadata: {}
data:
color_temp_kelvin: "{{ temp }}"
brightness_pct: "{{ brightness }}"
target:
entity_id: light.bedroom_lights
- variables:
temp: "{{ temp + 126 }}"
brightness: "{{ brightness + 3 }}"
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
mode: single