How do I save the GPIO setup?

Good question @bestes @jxrgen !
Use of DigitalSensor and DigitalActuator based devices will automatically set GPIO channels as input or output accordingly to the type of device.
For DigitalActuator, there is currently no way to set the default output value, we should fill a bug or feature request.