How to make openhab to remember GPIO states befor reset?

If the binding allows transforms, you can use a MAP or JS transform to swap the states coming from the binding to what you need.