Feedback pin to operate relay

Thanks for the advice but I cannot change the mechanic nor the switch.

just to clarify the issue, A0 pin should sense if >0v from the ac line to the motor, in that case- if the manual switch is on- if so the relay will be disable.
this is the same line that the relay will operate the motor (if A0<0V).
so the point here - when the relay will be enabled- operate the motor(manual switch is off) A0 will also sense >0v... so there must be a logic/ code solution here to determine for A0 that when its>0v only that the relay is working to allow to keep working for the relay.

please advice if its clarified?