# Humidity control flow

**URL:** <https://community.homey.app/t/humidity-control-flow/39868>\
**Category:** Flows\
**Created:** [December 27, 2020, 9:15am UTC](https://community.homey.app/t/humidity-control-flow/39868 "2020-12-27T09:15:27Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pavel\_Karzov](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pavel_karzov/32/17263_2.png) [@Pavel\_Karzov](https://community.homey.app/u/Pavel_Karzov)\
**Post date:** [December 27, 2020, 9:15am UTC](https://community.homey.app/t/humidity-control-flow/39868/1 "2020-12-27T09:15:27Z")

</div>

Hey everyone. I have humidity sensor and xiomi humidifier. I want humidifier to work on high speed If humidity less than 40%, medium if between 40 and 50%, low if 50-60% and switch off if it is above 60%. I’ve manage to do it only with 4 flows, 1 for each step and considering it is always ON. Is it better way to organize it?

Thank you.

---

<div class="post-metadata">

**Author:** ![Walter\_vande\_kerkhof](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/walter_vande_kerkhof/32/28963_2.png) [@Walter\_vande\_kerkhof](https://community.homey.app/u/Walter_vande_kerkhof)\
**Post date:** [December 27, 2020, 9:35am UTC](https://community.homey.app/t/humidity-control-flow/39868/2 "2020-12-27T09:35:50Z")

</div>

If it works for you, don’t question the solution 😉

---

<div class="post-metadata">

**Author:** ![Dijker](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@Dijker](https://community.homey.app/u/Dijker)\
**Post date:** [December 27, 2020, 9:39am UTC](https://community.homey.app/t/humidity-control-flow/39868/3 "2020-12-27T09:39:17Z")

</div>

Guess with just 4 flows for 3 thresholds so 4 states is great 👍  
Also depends on the avaliable option to switch on to a certain level.

---

<div class="post-metadata">

**Author:** ![Pavel\_Karzov](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pavel_karzov/32/17263_2.png) [@Pavel\_Karzov](https://community.homey.app/u/Pavel_Karzov)\
**Post date:** [December 27, 2020, 6:34pm UTC](https://community.homey.app/t/humidity-control-flow/39868/4 "2020-12-27T18:34:32Z")

</div>

Might be a good advise, however I have 3 humidifiers. Along with it I have 2 additional flows for “lights off at night” and notification about “low water level”. So the number of flows scary me a bit.  
And I am new with homey, I need to check that I am on the right way

---

<div class="post-metadata">

**Author:** ![Caseda](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/caseda/32/138695_2.png) [@Caseda](https://community.homey.app/u/Caseda)\
**Post date:** [December 27, 2020, 6:58pm UTC](https://community.homey.app/t/humidity-control-flow/39868/5 "2020-12-27T18:58:36Z")

</div>

I have over 380 flows, you have nothing to be afraid of, yet.

---

<div class="post-metadata">

**Author:** ![Ton\_Meek](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ton_meek/32/149_2.png) [@Ton\_Meek](https://community.homey.app/u/Ton_Meek)\
**Post date:** [December 27, 2020, 8:11pm UTC](https://community.homey.app/t/humidity-control-flow/39868/6 "2020-12-27T20:11:37Z")

</div>

@Pavel_Karzov I think it is possible in 3 flows:

Flow 1: IF humidity Changed AND humidity Less Than 50% THEN Start Flow 2 ELSE Start Flow 3  
Flow 2: IF Flow Started AND humidity Less Than 40% THEN High Speed ELSE Medium Speed  
Flow 3: IF Flow Started AND humidity Less Than 60% THEN Low Speed ELSE Switch Off

---

<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:** [December 28, 2020, 8:35am UTC](https://community.homey.app/t/humidity-control-flow/39868/7 "2020-12-28T08:35:18Z")

</div>

> [@Pavel\_Karzov](#):
>
> So the number of flows scary me a bit.

Homey is not quickly impressed by the numer of flows.  
I personally split up my flows as much as possible.  
I wrote a post on [“how to structure your flow”](https://community.homey.app/t/how-to-structure-your-flows/25109) it might inspire you.

---

<div class="post-metadata">

**Author:** ![Cuprum](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/cuprum/32/41409_2.png) [@Cuprum](https://community.homey.app/u/Cuprum)\
**Post date:** [December 14, 2021, 6:35am UTC](https://community.homey.app/t/humidity-control-flow/39868/9 "2021-12-14T06:35:34Z")

</div>

> [@Caseda](#):
>
> I have over 380 flows, you have nothing to be afraid of, yet

Yeah, I’m out of topic - so pls. do not kick so hard 😉  
But are You sure, the amount is not reducible and more fathomable with scripts? Yes, flow is simple and quick to implement, but such things, as described initially are little bit easier (and also cleaner) when implemented in script.  
Actually just a script, triggered by humidity change, and then in script there are defined ranges and corresponding levels.  
Yeah, i know, the next is quite simplified (setting/getting requires functions; there is very “jumping” switching… but it’s in one concrete place )

> if ( hum \< 40 ) then  
> speed = 3  
> else if ( hum \< 50 ) then  
> speed = 2  
> else if ( hum \< 60 ) then  
> speed = 1  
> else  
> speed = 0  
> end

PS. This is my own personal opinion, that such situation is better to solve with script, so, feel free to agree or disagree 😉

---

<div class="post-metadata">

**Author:** ![Caseda](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/caseda/32/138695_2.png) [@Caseda](https://community.homey.app/u/Caseda)\
**Post date:** [December 14, 2021, 7:48am UTC](https://community.homey.app/t/humidity-control-flow/39868/10 "2021-12-14T07:48:14Z")

</div>

Sure, but then why take a Homey if I need to script everything manually afterwards anyway.

I have many flows (now over 900 btw 🤪) cause I take everything apart as much as possible, making it really easy to spot issues if 1 arises. (With good naming of flows and staying consistent)  
If I change out a device and/or add a sensor, I don’t need to change flows at all (or perhaps 1 or 2) as that will update all behaviour of the other flows automatically.  
Very freeing not having to think about coding and/or changing the code afterwards when I add a device.

(PS: Homeyscript is also very limited in what it can do and change in Homey)

---

<div class="post-metadata">

**Author:** ![Cuprum](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/cuprum/32/41409_2.png) [@Cuprum](https://community.homey.app/u/Cuprum)\
**Post date:** [December 14, 2021, 8:32am UTC](https://community.homey.app/t/humidity-control-flow/39868/11 "2021-12-14T08:32:31Z")

</div>

> [@Caseda](#):
>
> Sure, but then why take a Homey if I need to script everything manually afterwards anyway.

Good question, let’s take the next one: Why take Homey, if I can not script on it 😉  
As i already told - the balance between script and flow is deeply individual. Yes, i also prefer to first attempt it with flow, and if this is not possible (or requires to much different flows… oops) then starting with script.

From my side - with scripts, may-be there no 900, but 90 flow(started script)s ?  
About changes in house - this must reflect in flows, as in scripts. Yeah, both can use global things, like “all lights in room”, but actually, if it requires manipulation with one specific device, then… flows require change in all points, in script i can use ‘let theDevice = “09dee1a3-0ea7-409c-94bb-b62da93b3cd9”’ and aft. use just theDevice. Ok, yes, i know about metadevices, groups. Then the group is quite equal with “theDevice”

Hmm, actually… the “flowing” is also The Coding 🙄 all we are children of the Turing machine, but the upper level languages are more or less oriented for specific purposes, and we are happy, if we can choose the one, most fit our needs. For example in my real life i’m ‘talking’ in language, where is not possible to say ‘c ::= a + b;’ - but it’s very easy to assign very complex structures with the same ‘a::=b;’.

PS. As this(my) direction is quite dry - this is my last post in humidity control topic. May-be another time & another place we can meet again.
