The hygrostat measures relative humidity inside enclosures containing electrical and electronic components. When the set relative humidity threshold is exceeded, the heating system is activated to prevent condensation from forming inside the enclosure.