Clear pin state before subscribe events.