Analog Reading of YL 69 Soil Moisture Sensor
This sensor is not a "voltage generator", it is actually a resistance that varies with moisture. To measure it you should make a voltage divider. Connect a 10k resistor from AO to Vcc. 

Inspect the original board and you will find this resistor standing between the sensor connector and the OpAmp.

Update: Turning off to increase sensor durability... I assume you are using the sensor as its main purpose - soil moisture measuring. If your ESP is totaly disconnected from any voltage potential like in a battery only operation and no wired communication, it will be fine to reduce the diferential voltage on both pins to 0. I am not sure can you switch the ESP's analog input to digital output - if you can, than you could write a 0 there. If not, you could use a small signal external n-channel MOSFET driven by some of the other pins to short this pin. 

This of course will draw some current trough 10k resistor from batteries, which may not be such a good idea for a battery operated device. You could use another small signal p-channel MOSFET to disconnect the pull up resistor. Both p- and n- channel MOSFETS could be driven by a single digital output pin.







simulate this circuit &ndash; Schematic created using CircuitLab

If your ESP is also connected to other devices, incl. battery chargers, then a leakage current may flow trough sensor's GND to the soil and cause sensor plates' corrosion. Your option here is to isolate the sensor when it is not used - you can do it with a DPST (or DPDT) relay to disconnect both sensor leads.