Invert soil humidity sensor value

I’m using a soil humidity sensor to automate plant watering, however I noticed the sensor values are inverted. Instead of the humidity going lower over time, it goes higher. If I take it out of the soil it goes up to like 70%. And if I put it in water, it goes down to 20%.
So the values are definitely inverted, but the question is how do I invert them back?
Tried invert:true and that does not work for this sensor.