# Problem with humidity flow,need ideas!

**URL:** <https://community.homey.app/t/problem-with-humidity-flow-need-ideas/41369>\
**Category:** Flows\
**Created:** [January 18, 2021, 1:53pm UTC](https://community.homey.app/t/problem-with-humidity-flow-need-ideas/41369 "2021-01-18T13:53:42Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eduardo\_Rodriguez](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eduardo_rodriguez/32/1902_2.png) [@Eduardo\_Rodriguez](https://community.homey.app/u/Eduardo_Rodriguez)\
**Post date:** [January 18, 2021, 1:53pm UTC](https://community.homey.app/t/problem-with-humidity-flow-need-ideas/41369/1 "2021-01-18T13:53:42Z")

</div>

I have a flow for when the humidity increases by 8% the fan turn on . It works perfectly. But randomly the sensors (xiaomi aqara) lose communication with homey, and report 0% humidity, and when they regain communication my flow is activated.

Any ideas how I can prevent it from activating after reporting that 0% humidity?

 ![IMG_20210118_144655](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/4/7/4741c4620625a890cbbd6b2b4ec115c1d25b469d.jpeg)

---

<div class="post-metadata">

**Author:** ![rampage](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rampage/32/2121_2.png) [@rampage](https://community.homey.app/u/rampage)\
**Post date:** [January 18, 2021, 3:18pm UTC](https://community.homey.app/t/problem-with-humidity-flow-need-ideas/41369/2 "2021-01-18T15:18:16Z")

</div>

You could add an additonal condition in the “and” where humidity is NOT 0, since that is unlikely to be a valid humidity.

---

<div class="post-metadata">

**Author:** ![FKey](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/fkey/32/14793_2.png) [@FKey](https://community.homey.app/u/FKey)\
**Post date:** [January 18, 2021, 6:00pm UTC](https://community.homey.app/t/problem-with-humidity-flow-need-ideas/41369/3 "2021-01-18T18:00:24Z")

</div>

Dont think that will work, the humidity has just changed (thats what triggered the flow) so it will not be 0 anymore…  
But you probably stored the previous value too (you need it to calculate if it increased) so use that tag in the AND

---

<div class="post-metadata">

**Author:** ![Eduardo\_Rodriguez](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eduardo_rodriguez/32/1902_2.png) [@Eduardo\_Rodriguez](https://community.homey.app/u/Eduardo_Rodriguez)\
**Post date:** [January 18, 2021, 6:56pm UTC](https://community.homey.app/t/problem-with-humidity-flow-need-ideas/41369/4 "2021-01-18T18:56:13Z")

</div>

I use 2 flows:

1  
when sensor humidity change  
Then set number variable humidity(i use better logic)

2  
When number variable humidity increased min by 8  
And variable humidity is greater than 50  
Them turn on fan

Don’t work. How can i memorice the 0 value to use as condition in ‘‘and’’ condition?

Edit: i will try 2 variables:

1  
when sensor humidity change  
Then set number variable humidity 1

2 when var humidity 1 change  
And var humidity 1 is not 0 (or less than 30 fe)  
Then set var humidity 2

3  
When number variable humidity 2 increased min by 8  
Then turn on fan

---

<div class="post-metadata">

**Author:** ![FKey](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/fkey/32/14793_2.png) [@FKey](https://community.homey.app/u/FKey)\
**Post date:** [January 18, 2021, 8:27pm UTC](https://community.homey.app/t/problem-with-humidity-flow-need-ideas/41369/5 "2021-01-18T20:27:19Z")

</div>

Can I ask what kind of environment you are measuring?  
I guess its a steamroom?  
At least humidity \>50 is pretty high for a normal room, especially in winter.  
And increasing humidity with 8, within two measuring points, that a huge step.

---

<div class="post-metadata">

**Author:** ![Eduardo\_Rodriguez](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eduardo_rodriguez/32/1902_2.png) [@Eduardo\_Rodriguez](https://community.homey.app/u/Eduardo_Rodriguez)\
**Post date:** [January 18, 2021, 8:50pm UTC](https://community.homey.app/t/problem-with-humidity-flow-need-ideas/41369/6 "2021-01-18T20:50:01Z")

</div>

I’m measuring the humidity in the bathroom. In Galicia (Spain) rains a lot. Humidity less than 50% is imposible. Only in very dry summers.

The humidity only increase by 8% when the steam of hot water.

---

<div class="post-metadata">

**Author:** ![FKey](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/fkey/32/14793_2.png) [@FKey](https://community.homey.app/u/FKey)\
**Post date:** [January 18, 2021, 9:49pm UTC](https://community.homey.app/t/problem-with-humidity-flow-need-ideas/41369/7 "2021-01-18T21:49:12Z")

</div>

> [@Eduardo\_Rodriguez](#):
>
> Don’t work. How can i memorice the 0 value to use as condition in ‘‘and’’ condition?

You already do in flow 1…

> [@Eduardo\_Rodriguez](#):
>
> 1  
> when sensor humidity change  
> Then set number variable humidity(i use better logic)

But this variable will follow the humidity

Try this:  
1  
when sensor humidity change  
Then set number variable humidity(i use better logic)  
_But add a delay of 1sec_

_For the second flow use the humidity not the variable_  
2  
When sensor humidity increased min by 8  
And variable humidity is greater than 50  
Then turn on fan

These two flows will run at the same time  
When value is 0 only flow1 will run the THEN

When the humidity is measured again the second flow will not run vpbecause the variable is still 0 (and will change 1 second later)

If your humidity sensor has larger interval for measuring you can increase the delay

---

<div class="post-metadata">

**Author:** ![Edwin\_D](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/edwin_d/32/136417_2.png) [@Edwin\_D](https://community.homey.app/u/Edwin_D)\
**Post date:** [January 18, 2021, 10:26pm UTC](https://community.homey.app/t/problem-with-humidity-flow-need-ideas/41369/9 "2021-01-18T22:26:33Z")

</div>

This should do it in one flow, it is a modified version of mine. Beware that “Luchtvochtigheid” is used of two sensors, but you really can’t tell which is which in the flow. (Actually, one is the local variable, the other is the sensor in the other room). You have to guess which is which 🙂  
[https://homey.app/f/OI2Cns](https://homey.app/f/OI2Cns)

---

<div class="post-metadata">

**Author:** ![Eduardo\_Rodriguez](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eduardo_rodriguez/32/1902_2.png) [@Eduardo\_Rodriguez](https://community.homey.app/u/Eduardo_Rodriguez)\
**Post date:** [January 18, 2021, 11:42pm UTC](https://community.homey.app/t/problem-with-humidity-flow-need-ideas/41369/10 "2021-01-18T23:42:25Z")

</div>

@FKey ,

1 I think that the delay of 1 second may not work, I don’t know how long it fails when it reports 0.  
2 I don’t have that card in the when section, only “the humidity has changed”, that is why I use the variable.

@Edwin_D ,

I just made the flow as you said, the part of turning on the fan works, now I just need to not turn them on when the connection fails. Need to wait…

I see you use the aqara sensors. You use the Aqara & Xiaomi Smart home (Zigbee directly to homey) app or the Mi Homey (wifi&gateway) app?

thanks to both!!

---

<div class="post-metadata">

**Author:** ![Edwin\_D](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/edwin_d/32/136417_2.png) [@Edwin\_D](https://community.homey.app/u/Edwin_D)\
**Post date:** [January 19, 2021, 11:07am UTC](https://community.homey.app/t/problem-with-humidity-flow-need-ideas/41369/11 "2021-01-19T11:07:14Z")

</div>

I have the aqara’s linked directly to homey, I do not own the aqara bridge.

The flow I provided should not trigger when the connection fails, because it ignores any case when a humidity value is 0. So if the bathroom reports 0, the flow stops in the and. If the bathroom humidity changes when the other room is 0, the flow stops in the and.

The same should apply if you copy the humidity to a variable - just don’t do that when it is 0, humidity is never 0. It will only do it’s work when both values are correct.

There is a small problem in the case that the other room would come back from 0% humidity to a value that is more than 8% below the bathroom’s humidity. Because as long as the bathroom humidity does’t change, nothing happens. In that (probably rare) case you should consider a similar flow that checks if you need ventilation when the other room’s humidity changes.

---

<div class="post-metadata">

**Author:** ![FKey](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/fkey/32/14793_2.png) [@FKey](https://community.homey.app/u/FKey)\
**Post date:** [January 19, 2021, 12:38pm UTC](https://community.homey.app/t/problem-with-humidity-flow-need-ideas/41369/12 "2021-01-19T12:38:22Z")

</div>

> [@Eduardo\_Rodriguez](#):
>
> 1 I think that the delay of 1 second may not work, I don’t know how long it fails when it reports 0.

The delay is added to prevent that the variable is updated, before it is used by the second flow.  
The 2 flows will run at the same time. But you want to prevent that the second flow is using the variable and that variable is just updated a ms before…
