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?
Hi, what happens when you use brackets around the difference?
Gives the same result. Somehow Homey thinks -700 is bigger than 200…
Try {{usage - production}}
Put calculations always between curly braces (accolades)
When the result is positive the calculation is OK, but will try tomorrow with the accolades. Tnx!
Tried with the {…} even with double {{…}}, but still the same behaviour.
A bug in the Homey calculation engine?
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:
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?
The post below will help you to “solve” the bug.
Just reboot homey and try again.
Self healing software by rebooting? lol