Hi, Broadly speaking it depends whether the switches are Normally Closed or Normally Open as to which way you wire them.
Colin
Door open, knee by the top hinge, pull the top of the door towards you in a jerking fashion.
Wouldn't it be the reverse in @mylesdw 's case - his door top needs to go inwards. Piece of wood in the opening by the top hinge and gently 'persuade' the top of the door?
Hi, That's why I said 'door open' meaning to then stand in the open doorway and pull the top of the door 'in'. It was poor phrasing and still not sure I've done it better. Your method will achieve the same effect.
Colin