Close blinds at certain time and the door isnt open

I want to close my blinds at a certian time. I have created a scene for that and it is working great, BUT I only want the blinds to close if my doorswitch is closed.
I got PLEG but I dont use it yet. So if anyone can tell me how to do this in PLEG Im very greatful.

How I want it to work. Between 20:00 and 7:00 the blinds should be closed, but if the door is open I dont want it to close. BUT if I close the door between these times I also want the blinds to close.

Thanks in advance.

The condition I use is:

tNight and (tNight;Now>00:15:00) and tRearDoorClosed;Now>00:15:00)

with your schedule time.

edit: formatting

HI
I am trying to do the same thing.
I have if a door sensor that is triggered between certain times, the blinds close. However if the door is already closed, the scene does not work. How do i fix this problem? Thanks in advance

Ummm

Reactor

C

There is no problem with the code.

Check for typo’s and ignore Catman comments, you asked for help with PLEG, not Reactor which is off topic.

Really? The poster appears to be trying to get a result. He seems to not mention the method at all, but I will bow to your coding ability

C

The code is PLEG.