Wired gate open/close sensor

Hi all. I have an existing wired open/closed magnetic sensor on my gate.
I am using a Shelly mini Z-Wave relay to open and close the gate using my Homey.

Is there a way to use the wired open/closed sensor with my setup? Or which component can I add to connect the wired sensor to my network?
I would like to define a flow like “when I get home AND the gate is closed, open it”.

The Shelly mini has switch contact also, why not use that as a signal for open / close. Keep in mind that you are using 230Vac on th contact.

You could use one of the other Shelly devices for just the contact information.