I was looking for advice about roller blind driver automation. I have it set up as close at sunset and open at sunrise. Living in Northern latitudes the nights become shorter this is not feasible. Is there a way to use sunrise/sunset as trigger or a set time whatever is latest or earliest? So sunset or 2000 whatever is earliest and sunrise or 0800 whatever is latest?
I’m sorry if this has been asked before but I was unable to find the answer with a search.
For the sunrise side, have two triggers: sunrise and fixed time: 0800.
Then add two conditions: sun above horizon and time later than 0759
In this way, the automation will trigger twice per day, but the conditions will only pass on the later one.
The sunset one is similar but you don’t need the conditions. Whichever happens first will cause the blinds to close, then the second will also have a cover.close_cover action, which will do nothing because they will already be closed.
[edited because of what @atlflyer points out below]
if someone comes in and opens/closes the shades manually in between 2000 and sunset then the second command will then re-close t. if you want that to happen, then don’t put the conditions. if you don’t want that to happen, then you need the conditions on both.
here’s the yaml for what @atlflyer described for morning.
description: ""
mode: single
trigger:
- platform: sun
event: sunrise
offset: 0
- platform: time
at: "08:00:00"
condition:
- condition: sun
after: sunrise
- condition: time
after: "08:00:00"
action: []