Turn LED on if Moisture Sensor Value >= MaxDryness for longer than 20min

Hi so I am making a self watering flower pot with a moisture sensor and a peristaltic pump, the code is attached.

I want to add an indicator LED which turns on if the sensor value has been equal to or greater than MaxDryness for longer than twenty minutes.

How would I alter the code to do that?

Hi

I would suggest reading two posts, both of them stickies at the top of the forum page