In a nut shell: Having started a fan using HE triggered by the amount of humid air in a bathroom, how do you, while the fan is running untill the air is dry again, make the fan stop if the time passes 22:00 in the evening, regardless of if the humidity is below the stop-the-fan threshold value?
In the laundry room and in the adjacent bathroom with a shower I have installed Aeotec humidity sensors. Both rooms are connected to air extractor pipes ending in one pipe on the roof where there is a roof fan installed to extract moist air. The roof fan is controlled by a speed controller which as of today has got a new Sonoff breaker installed to turn it off using HE. I n each room I will also install a zigbee remote to manually start or stop the fan.
I have started to create a rule in Rule Machine which I would like to have the following properties:
- Using global variables the Rule should be aware of if if wither button or the rule it self changes (not yet implemented in the rule below)
- The fan should start automatically if the humidity is above 40
- The fan should only start if the time of day is between 09 and 22
- The fan should stay on untill the humididty is below 35
- If the humididty for some reason has not sunk below 35 in 1,5h, turn the fan off
- If during the time the fan is working, the time passes 22 before the humitidty is below 35, turn of the fan anyway
Thank you for your patients having read this far!
My thinking is to log if the rule is running and then control the behaviour while it is running. This will result in a number of checks and then a sort of loop while the fan is working and the humidty dropping.
The issue?
I cannot think of a solution for how to check the time while the fan is working if the time should pass 22 before the humidity has reached below 35?
Any ideas on how to solve that?
If you have any other comments regarding the rule, all comments are always welcome. Please find the rul in its current half baked work in progress state below.
Thank you for you time and for any suggestions!