A device used to measure humidity is called a hygrometer; one used to regulate it is called a humidistat, or sometimes hygrostat. (These are analogous to a thermometer and thermostat for temperature, respectively.)