Regarding the triggers, the only thing that looks abnormal is the offset. Normally a Time trigger with 0 seconds offset will look like:
trigger: sun
event: sunset
offset: "0"
Other acceptable versions
trigger: sun
event: sunset
offset: "00:00:00"
trigger: sun
event: sunset
The conditions look fine, with a couple minor points. The main issue is whether you want the later or earlier trigger, as long it’s after 7am. The way it is currently configured the shutters will open on the earlier of the two triggers, as long it’s after 7am.
If you want the later of the two triggers, you need to add a Sun condition. That way, the 7am trigger won’t cause the shades to open if sunrise is after 7am.
Sun condition
- condition: sun
after: sunrise
It may be better in the long run to use the state of your person entity rather than a Zone condition based on a single device tracker. It is pretty common to need multiple trackers for a single person to get reliable presence detection.
Person-based condition
conditions:
- condition: not
conditions:
- condition: state
entity_id: person.david
state: home
First thing I’m not sure about is if the trigger at 7 is considered after 7, but I guess not. so I’d put in after 6:59.
But then, if sunrise is before 7, it will be blocked by the condition. If sunrise is after 7, then the trigger would already have happened at 7 and executed. So why bother trigger at sunrise again? So I guess, if the trigger is 7 and sun has not rose, you should block too? You only want the trigger at 7 to work if the sun is already up.
If you want two conditions to be true, you need both as a trigger and as a condition. See this post, from: my automation does not always work.