Valve sensor with IO-link