I am trying to make one automation run until the sun rises which is triggered by the sun’s dawn. The problem is that when the sun dawn, the repeat only runs one time even if the time is lower than the sun rising.
choose:
- conditions:
- condition: trigger
id: dawn
sequence:
- repeat:
until:
- condition: time
before: input_datetime.sun_rising
sequence:
- service: input_number.set_value
data:
value: >-
{{ 2300/(state_attr("input_datetime.sun_rising", "timestamp")
- state_attr("input_datetime.sun_dawn", "timestamp")) *
as_timestamp(now()) + (2200 -
(2300/(state_attr("input_datetime.sun_rising", "timestamp") -
state_attr("input_datetime.sun_dawn", "timestamp"))) *
state_attr("input_datetime.sun_dawn", "timestamp")) }}
target:
entity_id: input_number.light_temperature
- conditions:
- condition: trigger
id: rising
sequence:
- service: input_number.set_value
data:
value: 4504
target:
entity_id: input_number.light_temperature
What do I need to do to make my automation run until hits the sun’s rising time? What am I making wrong?