# Negative number interpretation

**URL:** <https://community.homey.app/t/negative-number-interpretation/18400>\
**Category:** Flows\
**Created:** [September 22, 2019, 3:34pm UTC](https://community.homey.app/t/negative-number-interpretation/18400 "2019-09-22T15:34:45Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![PinoV](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pinov/32/6321_2.png) [@PinoV](https://community.homey.app/u/PinoV)\
**Post date:** [September 22, 2019, 3:34pm UTC](https://community.homey.app/t/negative-number-interpretation/18400/1 "2019-09-22T15:34:45Z")

</div>

I created a flow which reeds my solar panel production and compares this with the house usage.  
Reason is to power on some things only while there is overproduction.  
I am struggling with a negative number of an expression.  
IF (usage - production) is more than 200 IS TRUE THEN…  
This is working unless the result is negative. Let’s say -700…  
Can it be Homey asumes -700 is bigger tan 200?  
Anyone has experience with a negative number as expression result?

 ![16](https://us1.discourse-cdn.com/flex025/uploads/athom/original/2X/5/5ae4a58776ccb686b39401cfe6aa0a5ddb31eedd.png)

---

<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:** [September 22, 2019, 7:41pm UTC](https://community.homey.app/t/negative-number-interpretation/18400/2 "2019-09-22T19:41:35Z")

</div>

Hi, what happens when you use brackets around the difference?

---

<div class="post-metadata">

**Author:** ![PinoV](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pinov/32/6321_2.png) [@PinoV](https://community.homey.app/u/PinoV)\
**Post date:** [September 22, 2019, 7:44pm UTC](https://community.homey.app/t/negative-number-interpretation/18400/3 "2019-09-22T19:44:59Z")

</div>

Gives the same result. Somehow Homey thinks -700 is bigger than 200…

---

<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:** [September 22, 2019, 7:56pm UTC](https://community.homey.app/t/negative-number-interpretation/18400/4 "2019-09-22T19:56:20Z")

</div>

Try {{usage - production}}  
Put calculations always between curly braces (accolades)

---

<div class="post-metadata">

**Author:** ![PinoV](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pinov/32/6321_2.png) [@PinoV](https://community.homey.app/u/PinoV)\
**Post date:** [September 22, 2019, 8:26pm UTC](https://community.homey.app/t/negative-number-interpretation/18400/5 "2019-09-22T20:26:08Z")

</div>

When the result is positive the calculation is OK, but will try tomorrow with the accolades. Tnx!

---

<div class="post-metadata">

**Author:** ![PinoV](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pinov/32/6321_2.png) [@PinoV](https://community.homey.app/u/PinoV)\
**Post date:** [September 23, 2019, 9:13am UTC](https://community.homey.app/t/negative-number-interpretation/18400/6 "2019-09-23T09:13:17Z")

</div>

Tried with the {…} even with double {{…}}, but still the same behaviour.  
A bug in the Homey calculation engine?

---

<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:** [September 23, 2019, 11:11am UTC](https://community.homey.app/t/negative-number-interpretation/18400/7 "2019-09-23T11:11:10Z")

</div>

I think you are right. This morning {{expression}} didn’t work anymore. There was an error message that a card was missing a tag. After a homey reboot it worked again. See pictures below:

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/2X/4/4feaa7126d0b51d3d753af0be6d48cf0d9486378.png)  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/2X/2/2085a89db8aad61a353fa0c2b08f668eb2d9dae4.png)

---

<div class="post-metadata">

**Author:** ![PinoV](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pinov/32/6321_2.png) [@PinoV](https://community.homey.app/u/PinoV)\
**Post date:** [September 24, 2019, 10:10am UTC](https://community.homey.app/t/negative-number-interpretation/18400/8 "2019-09-24T10:10:19Z")

</div>

I also tried some other things but Homey does not do the right thing with negative numbers. They just compare the number and not if it is a + or - number.  
How does this work to file it as a bug? Contact Homey support? Or do they read with us here?

---

<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:** [September 24, 2019, 10:57am UTC](https://community.homey.app/t/negative-number-interpretation/18400/9 "2019-09-24T10:57:37Z")

</div>

You can file a bug here: [https://support.athom.com/hc/en-us/requests/new](https://support.athom.com/hc/en-us/requests/new)

---

<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:** [September 24, 2019, 1:54pm UTC](https://community.homey.app/t/negative-number-interpretation/18400/10 "2019-09-24T13:54:48Z")

</div>

The post below will help you to “solve” the bug.

> [@Help with flow - missing TAG in flowcard error?](https://community.homey.app/t/help-with-flow-missing-tag-in-flowcard-error/18438/6):
>
> @Ton_Meek Yes, you were right. A reboot solves this issue. The flow can be saved and does not return a ‘Missing TAG in flowcard’ message.

Just reboot homey and try again.

---

<div class="post-metadata">

**Author:** ![PinoV](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pinov/32/6321_2.png) [@PinoV](https://community.homey.app/u/PinoV)\
**Post date:** [September 24, 2019, 2:18pm UTC](https://community.homey.app/t/negative-number-interpretation/18400/11 "2019-09-24T14:18:37Z")

</div>

Self healing software by rebooting? 😉 lol
