Configuration awning with sunlight sensor and/or temperature

Hello,
I have an awning (roll in / roll out) and a sunlight sensor (MAX44009 lux sensor). The awning needs about 20 seconds to fully roll out. After that the roll out switch must be set to stop position.
The awning should be rolled out only when lux>8000 and rolled in when lux<3000.
And roll in/out should be take place only 1-2 times a day. So a kind of delay is needed.

Is such a configuration possible with HA automation?

Does someone has a blueprint?

Thanks, Pete

Seems you can use regular automations and use the ‘choose’ in the actions. Does the roll-in/out have a security to auto stop as I would not trust HA with all the connections to be 100% accurate in 20s

Yes, it has a security stop.

OK, just for you to understand that I donot have such a thing :slight_smile:
Create a automation (via gui)
go straight to Actions and use ‘Choose’ now you can create
Option 1:
condition: light < value
action: switch
action: wait for time (20sec)
action: switch
Add Option 2:… and as per above, the same idea but when light > value