How to sense when a plant needs to be watered?
If you use two probes, made of different material, and they're in the moist environment, you'll have a battery. You can measure this tension to know how dry /wet the soil is.

That's how those soil moisture work, without batteries. You can attach it to any eletronic device (like automatic watering, or something like that).