Blind motor does not close if door sensor is open

How to make the blind motor not close if the door sensor is open, this being activated by voice or control… It would have to as soon as it starts to close, reverse and open… However, when I create a routine the motor only opens after finishing closing , it seems that it only updates the status after stopping the movement. Do you have any solution?

Not exactly sure of the situation here, but a contact sensor on the blind could be the solution as the trigger? This is a method I use on a blind I have.