change switch state and obs data