Okay. I put back the 1M resistor and got a strange behavior when using the AN1 as a digital input. This may have been what threw me off in the first place. When the AC unit is OFF both AN1 and AN2 inputs show a ON (which represent that power is off). And when the AC unit is ON, AN1 show an OFF and AN2 show an ON. It is as if, it is reporting on both AN1 and AN2 even though nothing is plugged into AN2. Is a normal behavior? Without the resistor, it only reported on AN1.
This may have been why I thought this wasn’t working. But, this may be the correct behavior.
Well, after running for a few minutes, the AN2 input is fluctuating between ON and OFF. Is this where the so-called pull-up resistor come into play? Since AN2 is not being used, can I connect the AN1 lead also to the AN2 input to prevent it from fluctuating back and forth causing unnecessary logic calls in the application logic.