You didn’t post any conditions. Please post the complete automation for both if you mean condition:.
You’re right in what you say: provided the sensor changes smoothly it shoudl do what you want if there is no other code you haven’t included. Can you post a state graph for the humidity sensor? If that is “noisy” you might have problems that you could fix with a “for: "00:01:00"” or similar.