[Rule] ventilation ON if valueX > Y and OFF if valueX < Y

Hi there!
i have a humidity sensor near the dryer and i’d like to start ventilation if humditiy oversteps a specific value.
ventilation should stop if the given value drops under the specific value. i have no idea how to do the second part… please help?


You need a Rule that triggers on changes to the humidity sensor.

In the Rule test to see if the new value is above a certain value and if so send the ON command to the switch.

Else if the value is under a certain value send the OFF command to the switch

    if(Humidity.state > highThreshold) Vent.sendCommand(ON)
    else if(Humidity.state < lowThreshold) Vent.sendCommand(OFF)

Make sure highThreshold and lowThreshold are one or two apart to avoid the vent turning on and off as the temp bounces around at the threshold.

@narf27 does your vent have a damper that opens and closes via signal or just a fan that turns ON/OFF?

there’s a fan with different settings (0,1,2,3,auto).
thanks for your input @rlkoshak i think (i hope?) i can work something out with these lines!
i’ll keep you up to date!