Revert "return state variable if configured as output"

This reverts commit 8ee8fa98133f19401c1c7fe2f7836e7d3be8cec9.