Ventilation rule help

Hi

I need some help with my ventilation rule.
I have TD-350/125 SILENT fan and it has two speeds motor which I want to control with Sonoff Dual.
Main idea is that if room humidity is under 40% then both motors are off, if between 40% to 69% then motor1(speed1) is operational and when above 70%, then motor2(speed2) is ON and motor1 is OFF.
My problem is how can I be sure that motor2 doesnt start before motor1 is OFF, maybe some delay or something else?

Here is my example rule

rule “Vent”

when
Item humidity received update
then
var double humRoom = new Double(humidity.state.toString())
if (humRoom <= 40 ) {
sendCommand(Vent1, OFF);
postUpdate(Vent1, OFF);
sendCommand(Vent2, OFF);
postUpdate(Vent2, OFF);
}
else
{
if (humRoom >= 70 )
{
sendCommand(Vent1, OFF);
postUpdate(Vent1, OFF);
sendCommand(Vent2, ON);
postUpdate(Vent2, ON);
}
else
{
sendCommand(Vent2, OFF);
postUpdate(Vent2, OFF);
sendCommand(Vent1, ON);
postUpdate(Vent1, ON);
}
}
end

Ideally this would be implemented on the device itself. It sounds like there needs to be a fail safe. Failing that, does the device report back when the motors change state? If so you should turn off autoupdate so the Item does not change in response to the command but will wait until the device says the motor has turned ON or OFF. Then you can trust that the state of the Item matches the state of the actual motor.

Once you can trust the state, you can set a timer and check when the timer goes off whether or not the motor is OFF before sending the command to the other motor to turn ON. If it’s not OFF generate an error log or something so you know what happened.

Why are you sending a command and then updating the Items? That never makes sense. If the device doesn’t report it’s changes of states then turn autoupdate on and OH will update the Item in response to the command for you. Of course this means you never really know what state the motors are really in. You are just assuming that everything worked.

You should compare inside and outside absolute humidity to see if a running ventilation would increase or decrease the inside humidity.

I turned autoupdate OFF so now I should use timer with check if motor has stopped?
Can you give me some hint how I should use it?

BlockquoteYou should compare inside and outside absolute humidity to see if a running ventilation would increase or decrease the inside humidity.

This is sauna house and I usually use it once in a week so I need only use ventilation when I use sauna.