The Leonardo da Vinci device using humidity-sensitive materials to indicate moisture in the air was a hygrometer.
Leonardo devised an early hygrometer to study atmospheric moisture. The instrument used a balance involving materials whose weight changed when they absorbed water from humid air. A change in balance could therefore provide a visible indication of humidity.
A hygrometer measures moisture in the air, while a rain gauge measures the amount of precipitation collected over time. A barometer measures atmospheric pressure, so those instruments answer different questions even though all belong to weather observation.
Leonardo’s design was an early scientific instrument rather than a modern electronic humidity sensor. Its importance lies in making an invisible property of the atmosphere observable through a physical change in weight. Later hygrometers used hair, salts, wet-bulb thermometers, and electronic sensors.