# Logic

**URL:** <https://community.homey.app/t/logic/17111>\
**Category:** Questions & Help\
**Created:** [August 20, 2019, 11:07am UTC](https://community.homey.app/t/logic/17111 "2019-08-20T11:07:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Johann\_Ernst](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/johann_ernst/32/12440_2.png) [@Johann\_Ernst](https://community.homey.app/u/Johann_Ernst)\
**Post date:** [August 20, 2019, 11:07am UTC](https://community.homey.app/t/logic/17111/1 "2019-08-20T11:07:43Z")

</div>

Hello  
I am writing my first flows.  
I don’t achieve to write correctly my logic.  
Basicaly, i want to compare 2 temperature sensor, and trigger the action only if i got a 5 degrees difference between both temperature. See caps.  
Without the “+5” , i dont have any problem, but once i add the “+5” (like in the screenshoot), my logic is always false (when i ran the test, “Temperature (°C)” was 18.46 and the second “Temperature” was 18.9

If i write the logic a bit differently and i move the “+5” on the top i got “non\_numeric\_value1” error.  
What is wrong ?

PS : sorry for the french “est moins que” in the screenshoot means “is less than”  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/2X/5/576f2226ce1e4a21ce006631f28af3e54afe5a35.png)

---

<div class="post-metadata">

**Author:** ![Rocodamelshekima](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rocodamelshekima/32/8209_2.png) [@Rocodamelshekima](https://community.homey.app/u/Rocodamelshekima)\
**Post date:** [August 20, 2019, 11:17am UTC](https://community.homey.app/t/logic/17111/2 "2019-08-20T11:17:03Z")

</div>

And u also tried double brackets like stated in the tooltip ?

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/2X/a/a7810ea6bfadd2166834d6757aef107ca9cdb077.jpeg)

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/2X/0/052b2725327f93878f15f6ebec7d468b2c64f3d3.jpeg)

---

<div class="post-metadata">

**Author:** ![Johann\_Ernst](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/johann_ernst/32/12440_2.png) [@Johann\_Ernst](https://community.homey.app/u/Johann_Ernst)\
**Post date:** [August 20, 2019, 11:26am UTC](https://community.homey.app/t/logic/17111/3 "2019-08-20T11:26:38Z")

</div>

That’s it…  
double curly brackets did it. single curly bracket was not enough  
Thanks !
