Fandis mechanical hygrostat switches on electrical enclosure heating or cooling units when a preset relative humidity (RH) is exceeded. The relative humidity is kept above the dew point and the condensation of water on electrical components and the corrosion of unprotected sheet metal is prevented.