On our 2017 the switch is a reed non contact switch. Not the brass pogo contacts on the hinge side. Our switch is on the latch side in the door frame. It is the second flush plug looking thing from the bottom.
You should find a corresponding magnet mounted on the door that lines up with the switch.
Our switch is intermittent (sticks). If the steps don't go out I tap the face of the switch with my toe of my shoe and so far it has always worked.
It's a bad design with the body and rear of the switch located in the wheel well, so if it leaks and you drive in the rain, bad things can happen.
Now if yours is actually working backwards, going out instead of going in with ignition key on, then you might have the same issue I am having with my replacement switch from Entegra CS.
They couldn't "decide" on which replacement switch I needed, so they sent me two switches!
One is normally open and the other is normally closed, so they will work opposite of each other! One will think the door is open and extend the steps. The other will think the door is closed when it "sees" the magnet and retract the steps.
I am currently waiting on CS to decide which switch (the one they call black dot, or the other that they call red dot) , before I attempt the replacement.
So far they haven't been able to figure it out since Thursday!
So if this a problem you have had since delivery, I wonder if you have the wrong reed switch in the door frame. Entegra apparently has two different switches floating around the production floor.
Steve