# How to create a flow, which picks and sorts the three lowest values of a group of sensors and sends a push message

**URL:** <https://community.homey.app/t/how-to-create-a-flow-which-picks-and-sorts-the-three-lowest-values-of-a-group-of-sensors-and-sends-a-push-message/78138>\
**Category:** Flows\
**Tags:** advancedflow\
**Created:** [March 20, 2023, 9:59pm UTC](https://community.homey.app/t/how-to-create-a-flow-which-picks-and-sorts-the-three-lowest-values-of-a-group-of-sensors-and-sends-a-push-message/78138 "2023-03-20T21:59:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Felix\_Brandt](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/felix_brandt/32/34813_2.png) [@Felix\_Brandt](https://community.homey.app/u/Felix_Brandt)\
**Post date:** [March 20, 2023, 9:59pm UTC](https://community.homey.app/t/how-to-create-a-flow-which-picks-and-sorts-the-three-lowest-values-of-a-group-of-sensors-and-sends-a-push-message/78138/1 "2023-03-20T21:59:51Z")

</div>

I have 8 Soil sensors in the garden. As soon as one goes \< 40% soil moisture an event should be triggered. In this Event a push message should bei sent: “Watch out. Zone 4 has a soil moisture \< 40%, Zone 5 has 42%, Zone 6 has 43%”.  
I am using the advanced flow system and tried to use the advanced logic plugin but wasn’t able to figure it out. Im not familiar with JSON or Homey script which might do the job.  
Anyone able to help?

---

<div class="post-metadata">

**Author:** ![Paul\_van\_Ulft](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/paul_van_ulft/32/56539_2.png) [@Paul\_van\_Ulft](https://community.homey.app/u/Paul_van_Ulft)\
**Post date:** [March 21, 2023, 8:59pm UTC](https://community.homey.app/t/how-to-create-a-flow-which-picks-and-sorts-the-three-lowest-values-of-a-group-of-sensors-and-sends-a-push-message/78138/2 "2023-03-21T20:59:30Z")

</div>

I think you shoulkd use the any butoon.  
Read the soil sensor.  
If soil 1 changed, if soil 2 changed → Link it to any button form that button If soil 1\<40% → Push message  
From tge any button also If soil 1\<40% → Push message etc
