Get status from GPIO

Hello, I’ve connected a lock to a Pi-zero W, and manage it through home assistant.

The lock has the capability to show the state of the lock.
Two wires come out, witch are connected when the lock is closed, not connected when open.

I thought i’d pull 3.3V from the PI to 1 wire, and the other wire to a GPIO-pin on the PI.
3.3V when closed, 0V when open.

For some reason I can’t get this to work (the lock itself works fine though).
This is the lock I’m using:

CODE:

GPIO-Doorlock-control

switch:

  • platform: remote_rpi_gpio

    host: 192.168.1.#

    ports:

    12: Door Lock

    6: Lock State

GPio has been depreciated on latest build, but still supported by custom integration from hacs:

It still works fine for the lock though, and everything is detected.