# Why does this flow ignore the "\[tag\] is less than \[number\]" card?

**URL:** <https://community.homey.app/t/why-does-this-flow-ignore-the-tag-is-less-than-number-card/59562>\
**Category:** Questions & Help\
**Tags:** flow\
**Created:** [February 1, 2022, 1:50pm UTC](https://community.homey.app/t/why-does-this-flow-ignore-the-tag-is-less-than-number-card/59562 "2022-02-01T13:50:22Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![fmork](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/fmork/32/47409_2.png) [@fmork](https://community.homey.app/u/fmork)\
**Post date:** [February 1, 2022, 1:50pm UTC](https://community.homey.app/t/why-does-this-flow-ignore-the-tag-is-less-than-number-card/59562/1 "2022-02-01T13:50:22Z")

</div>

I am doing some tests around logic in flows, and I came across this behavior that just seems plain wrong. I assume that I am missing something fundamental, but I don’t get it. I have this flow:

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/e/4/e48d3af4b5c3064c722e88741314c57a7422d2b5.png)

The Logic variable `randomNumber` is calculated elsewhere, as `{{round(random(0,30))}}`. When running the flows, I got this printout in the Homey app:

 ![IMG_3368](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/a/5a29908cf456a21d4ef6d7a3a286e1162eea04aa.jpeg)

I got the same behavior for other `randomNumber` values greater than 24, but not when `randomNumber` is 12 or less.

Can someone explain why it seems to ignore the `randomNumber is less than 24` card?

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [February 1, 2022, 3:00pm UTC](https://community.homey.app/t/why-does-this-flow-ignore-the-tag-is-less-than-number-card/59562/2 "2022-02-01T15:00:51Z")

</div>

Homey cloud or Pro?

---

<div class="post-metadata">

**Author:** ![fmork](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/fmork/32/47409_2.png) [@fmork](https://community.homey.app/u/fmork)\
**Post date:** [February 1, 2022, 3:02pm UTC](https://community.homey.app/t/why-does-this-flow-ignore-the-tag-is-less-than-number-card/59562/3 "2022-02-01T15:02:21Z")

</div>

It’s a Homey Pro.

---

<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:** [February 1, 2022, 3:17pm UTC](https://community.homey.app/t/why-does-this-flow-ignore-the-tag-is-less-than-number-card/59562/4 "2022-02-01T15:17:01Z")

</div>

When/how exactly is the random number changed? It could be a race condition there the random number did satisfy the and but changed before it got time to create the nofification.

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [February 1, 2022, 3:20pm UTC](https://community.homey.app/t/why-does-this-flow-ignore-the-tag-is-less-than-number-card/59562/5 "2022-02-01T15:20:26Z")

</div>

Ok. I’ve tried on Homey cloud  
This works as expected

 ![Screenshot_20220201-161749_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/2/3/23602ea0c4c7796129d213d5054a370ec5acf971.jpeg)

---

<div class="post-metadata">

**Author:** ![fmork](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/fmork/32/47409_2.png) [@fmork](https://community.homey.app/u/fmork)\
**Post date:** [February 1, 2022, 3:21pm UTC](https://community.homey.app/t/why-does-this-flow-ignore-the-tag-is-less-than-number-card/59562/6 "2022-02-01T15:21:00Z")

</div>

randomNumber is calculated by a manually triggered flow. The behavior is consistent even if I trigger this flow manually several times without the randomNumber variable changing between invocations, so I don’t believe it’s a race condition. The variable, the flow calculating and this flow here were created just for this testing purpose, so they are not used or altered by any other flows in my system.

---

<div class="post-metadata">

**Author:** ![fmork](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/fmork/32/47409_2.png) [@fmork](https://community.homey.app/u/fmork)\
**Post date:** [February 1, 2022, 3:22pm UTC](https://community.homey.app/t/why-does-this-flow-ignore-the-tag-is-less-than-number-card/59562/7 "2022-02-01T15:22:07Z")

</div>

Interesting. I will re-create my flows from scratch later this evening to see if they behave differently.

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [February 1, 2022, 3:22pm UTC](https://community.homey.app/t/why-does-this-flow-ignore-the-tag-is-less-than-number-card/59562/8 "2022-02-01T15:22:28Z")

</div>

OP is using “not less than”, which is a different card from “greater than” which you’re using (although I don’t think it’ll matter, I can’t reproduce the problem).

---

<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:** [February 1, 2022, 3:23pm UTC](https://community.homey.app/t/why-does-this-flow-ignore-the-tag-is-less-than-number-card/59562/9 "2022-02-01T15:23:20Z")

</div>

Could it be tou have more tags called randomNumber that somehow got mixed up and you test the wrong version?

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [February 1, 2022, 3:26pm UTC](https://community.homey.app/t/why-does-this-flow-ignore-the-tag-is-less-than-number-card/59562/10 "2022-02-01T15:26:56Z")

</div>

Yeah I noticed now the TS used “is not less than”  
I’ll give it a test.  
But it should be exactly the same filter as “is greater than”, except `12` is valid in the first filter, and invalid in the last filter?

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [February 1, 2022, 3:36pm UTC](https://community.homey.app/t/why-does-this-flow-ignore-the-tag-is-less-than-number-card/59562/11 "2022-02-01T15:36:43Z")

</div>

Seems also to function as expected

 ![Screenshot_20220201-163246_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/b/9/b97df0e42a07771ed70bed9aafd8e75edbc8ad2c.jpeg)
