Context: I'm working on a gardening project using a microcontroller to power grow lights and other related components after I've built on top of it.
Case: I was interested in adding some hygrometers to detect their moisture levels rather than guess-timating when it'd be appropriate to water them.
Issue: One design issue I've seen repeatedly when researching the subject: if hygrometers are used to detect moisture levels in soil over prolonged periods of time, the metal will begin to corrode causing accuracy/sensitivity issues.
Q: Is there a way to prolong their life to prevent corrosion+retain accuracy, or some tips for instrumentation people may not be following? Would a hygrometer be the sustainable solution here considering the Case and Context?