Correct method of logic for acting on values above/under a threshold

Heey guys,

Still loving my Homey but to learn a bit more i would like to ask what the correct method is to integrate certain flow steps in Flows that have certain values. My situation is that i want to control the mechanical ventilation. I`ll explain:

I have started several years ago with X10. When i bought my house there was only a mechanical 3 way turn switch in the kitchen that lets me select the setting for the ventilation. The motor was an older model J.E. Stork Air CML model. Every morning before showering i had to go to the kitchen to adjust the ventilation. :face_with_raised_eyebrow: You get that that was not sustainable for very long. :wink: So i decided to automate this. I have connected 2x Eaton SAIX-12 X10 modules to the motors which controls the power lines for selecting the right speed. In the bathroom there is a SS13E X10 wall button switch. Many people have these kind of motors in their homes. And i have seen more threads about this. Now its not especially that i want to know how i get this motor running through Homey (then i could read the other threads again) but more about the correct way to design flow actions above or under certain percentage thresholds.

So how it works now: When both SAIX12-#1 + SAIX12-#2 are off the motor runs just 1 line. Normal 230 volts. When SAIX12-#1 is on and #2 is off then the motor runs at the middel setting. When #1 + #2 are on the motor runs on full speed.

I have placed a Xiaomi Aqara Humidity sensor in the bathroom which works unbelievably well for its price. Its very small, feels high quality (for Chinese standards) and detects changes very quickly. In 1 minute after turning on the shower the commands are sent to the SAIX12 modules and the fan starts pulling the humidity out of the bathroom. I have set that when the humidity changes and it gets ABOVE 80% it triggers a flow that sends a command to SAIX12-#1 = #2 to ON + send a Push Message to my iPhone (temporarily, for testing purposes). When the humidity is going down and under 80% again it turns the SAIX12 modules OFF again with a delay of 15 minutes (because 80% is relatively high).

The problem i have here is that with every humidity change (which can be 0,1%) it triggers the flow everytime which causes the X10 signals to be sent over and over to the SAIX12 modules and it creates a Push Notification. These signals are unnecessary and i would like to create my flow that the signals are only sent ONCE after the humidity level reaches ABOVE 80%. Not that i am an “Aluhoedje” thats needs to lower the amount of signals but its just that i want to learn how to do this and to have the system use its resources properly.

I could not find the correct way to do this with the built in Homey logic. Preferably i would like to do it with the built in logic ways instead of installing other apps for this (i have seen Countdown, Better Logic used etc).

I have added a screenshot of the flow.

Thanks in advance for reading and looking forward on everyones thoughts in how to do this correctly. Then maybe we could create a single file or thread on this for new people starting with Homey.

Maybe u can set a Logic boolean variable in ur flows.
WHEN humidity changed AND is bigger then 80 AND boolean is off THEN set fan on AND boolean to on AND push message.
WHEN humidity changed AND is lower then 80 AND boolean is on THEN set fan off AND set boolean to off.

–edit-- Make sure u set the boolean before u can use the flows.
Advantage of Better Logic is u can set them in the settings screen and, also in the settings screen, u can see the actual state of the boolean.

Thanks for the quick reply!

Ok, i understand what that would do. I have downloaded Better Logic to at least understand what will happen. I have created a VentilationStatus Boolean but only a variable is not linked to the actual ventilation. Do you need to update the status from the Ventilation system in another flow?

U update the status in the flows i posted above?

WHEN humidity changed AND is bigger then 80 AND VentilationStatus Boolean is false THEN set fan on AND VentilationStatus Boolean to true AND push message.
Or do i misunderstand ur question?

So sorry for the extremely late reply. I just noticed the reply I typed was still in the reply box and wasn’t posted yet. So sorry. :see_no_evil:

I have fiddled with it but I haven’t succeeded yet in a good stable solution. I did work with setting the variables but for some reason the humidity sensor still keeps reacting on every temperature change and letting the ventilation going on and off during the flow. So have to look into it again.

Here is my solution, maybe that helps you :slight_smile:

PNG