A factory reset returns your device to the software condition it was in when you opened its box. Your Wi-Fi connection information is permanently erased and your device is put back into pairing mode. At this point, your plug is not able to automatically reconnect to the network it was previously connected to and will not be able to detect motion anymore. You should be able to connect to your network again through the usual setup flow after performing a factory reset unless there is an issue with the plug or network connectivity.