NodeMCU : Input pullup in A0
As stated by Majenko in the comments, I thought that all MCUs analog gpios had a pullup resistor built in, so I have been able to solve the problem using an external pullup, in this case connecting a 10K resistor like in the diagram: 

 . 

Special thanks to Majenko for his time and patience. Cheers!