Inversement du statut ouvert/ fermé d'un capteur de porte

Hello
Is it possible to invert the open/closed state of a door sensor, and if so, how?
Thanks
good evening

English only please.