Homey Community Forum

[APP] Better logic / Variable management (v1.0.4)


So I’m trying to use Math.js for the first time with this app and I’m clearly making a mistake…


Initially tried without any ’ or ( or the ‘evaluate’ before realising that I probably needed them. Checked syntax on the math.js website but now I’m stuck

How do I do what I want to do - subtract one humidity value from another and if it’s greated than 8 then do something?


I would think that Better Logic internally already uses evaluate, so just Humidity - Humidity > 8 might work. Spurious whitespace around tags may be an issue, at least with the regular Logic it is known to cause problems.

I tried without evaluate to start with and didn’t seem to work sadly :frowning:

Is it possible to do with Standard logic then? (your comment seems to imply so!)
I tried with a standard logic variable but equally getting an error… :frowning:

What error? Theoretically, it should work:

However, it has taken me about 15 minutes to create this flow, because I kept getting all kinds of random errors (one that kept causing saving the flow to fail even when I removed all flow cards from the flow, so I had to create a completely new flow to get out of that loop).

For some reason, it works for some numerical tags (like “Luchtvochtigheid (%)” in my example) but not on others (those give a “non-numerical value” error, even though the tags are numerical).

1 Like

I haven’t managed to view the error, all I seem to get is a red exclamation point in the top left. How do I see what the error actually is?

Doesn’t a red exclamation point mean that the comparison was false? I.e. that Humidity - Humidity wasn’t more than 8.

Don’t think so, because I have an action on both outcomes and neither was working
Also tried reversing to less than

Like Robert mentioned before: be aware of white spaces!!

Yeah - made it work with standard logic. Damn white spaces!

If you feel like it, send Athom a support request about this. Although this has been an issue for so long now that I don’t think they care.

1 Like

Hello @robertklep

i try to set a betterlogic VAR into a other betterlogic VAR: but i just become the following Error:
flow error

What i try is:

I dont know what is going wrong?!

i fixed it by “Set a variable” without the number Flag.

1 Like

Hi all!

Is it possible to rounding up a number variable? And how can i do this within a flow?
The problem ist, that i try to send a room temperature to a wallthermostat. But it is only possible with round numbers like 21.5° or 22°, but unpossible with numbers like 21.4° oder 22.1°

you can round to the nearest 0,5 decimal with this calculation: round(value * 2)/2

Then you could put it in 1 flow by calculating, then with delay send it to the thermostat, though it does need a few seconds of delay, if you want a faster responds time you could create a second flow that triggers on the change of that variable you are changing for the calculation.

1 Like

I am using this app because of the basic-status it has when I installed some apps when I just bought my Homey. I notice now that I almost never use it, I just use the normal Logic flow cards. The advantage of that is that I can quickly check the statussen in the app under “logic”.

What is (or better: when is) this app better or more suitable than the default logic options?

In order to be able to calculate with time, I sometimes use Chronograph transitions to increase variables, e.g. one step per minute to show length in minutes later on.

I have a lot of numerical variables that have absolutely no use in insights. Wouldn’t it be usefull to be able to indicate whether insights are saved in order to save time and storage?

At that time I owned a Homey (Early 2016) with at least 24 apps. So installing an additional app did not seam like a good idea at the time. I now have a Homey Pro (Early 2019) which can handle a lot more apps. So for sure I will try the chronograph transitions app soon.