I have a capacitive sensor measuring moisture in a plant.
sensor: - platform: adc pin: 36 attenuation: 11db name: "Kontor Plante Fugtighed" update_interval: 60s
It provides fine readings, but of course a Voltage reading. I guess 3.3v for 0% moisture, and 0.0v for 100% moisture.
Question is if there is a kind of mapping parameter I can use to get this displayed as the % moisture?
In Arduino code I would use
map(value, fromLow, fromHigh, toLow, toHigh)
Does this exist? What should I add to my code?