I believe you’ll want this (which is similar to what I do in some of my automations):
- alias: Open cover on sunrise, or at 6:15, whichever comes last
trigger:
- platform: sun
event: sunrise
- platform: time
at: '06:15:00'
condition:
- condition: sun
after: sunrise
- condition: time
after: '06:15:00'
action:
- service: cover.open_cover
entity_id: cover.kkken_rullegardiner
I think you want it to open at sunrise or 6:15, whichever comes last. Is that right? The automation above will trigger at both sunrise and 6:15, but the action will only run if, at that time, it’s both after sunrise and after 6:15. (Don’t worry, a condition that requires it to be “after” a particular time or event will be true when triggered by that exact time or event. At least, that has been my experience.) So the action will only run once, at sunrise or at 6:15, whichever comes last.
For closing, it’s similar, but I think you want sunset or 21:00, whichever comes first. Is that right? If so, it’s even simpler (you don’t need a condition, as long as calling the close service when the cover is already closed isn’t an issue):
- alias: Close cover on sunset, or at 21:00, whichever comes first
trigger:
- platform: sun
event: sunset
- platform: time
at: '21:00:00'
action:
- service: cover.close_cover
entity_id: cover.kkken_rullegardiner