Hi all
Is there a way to make a "if difference between A and B is more than insertvalue ?
Iâm setting up two temp sensors for my house and want to try some stuff.
vkr
victor
Hi all
Is there a way to make a "if difference between A and B is more than insertvalue ?
Iâm setting up two temp sensors for my house and want to try some stuff.
vkr
victor
Use the MathJS card.
Might need to add the OR to check 2 calculation if one gives you a negative value
((A-B)>insertvalue) or ((B-A)>insertvalue)
what do you mean with "check for negative?
I donât quite get it. insert value will make the variable this or? how would it work?
You would like to check if the difference between your two sensors are a certain value correct?
You can use the mathjs expression is true
card in the AND slot.
The example I gave may give a negative value if the first sensor gives a lower value than the second sensor in the equation. Ie a 19c and 26c temp reading will be -7 and 7 in the respective equation.
If your insertvalue is 5, the -7 result will still be true when it checks if the result is <5 and thatâs not desired. So the correct equation should be
(((A-B)>*insertvalue*) and (a-b)>0)) or (((B-A)>*insertvalue*) and (b-a)>0))
The insertvalue can be a number you type in or a global tag.
Hi!
I have problems with Better Logic and have not been able to get help.
I enclose pictures of the error message and the flow. It is a total of 3 flows.
When I try to share the flow. I only get an error message. As you can see, it applies to all three flows. I also attach a picture from Better Logic.
I do not know and have not been able to get an answer if there is a fault with Homey or Better Logic.
The flows work as they should!
I think that Homey doesnât like the spaces in your variable names. If that doesnât solve the problem, also try removing all accents from characters.
robertklep
I have other flows with swedish letters and space in the name without problems!
But now I have tet to write the flows without swedish letters and space. And you can see it is the same!
That answer I get from the Homey support was they think its any messes with the code of the better logic app?
That is why I write here either for help or for anyone who knows the code for better logic to see if there is anything wrong
When exactly do you get that error? When you test the flow, or when you just open the flow in the editor?
Ah, I can reproduce the problem when you try to share the flow. You should ask Athomâs support where app developers can find any guidelines to prevent these issues (hint: there arenât any! I have to conclude that this a bug in Athomâs âshareâ code).
Below you can see the answer from Homey support
Hi Hans,
Thank you for reaching out to us. Unfortunately, Better Logic is an app that is developed by a Community Developer, and I cannot offer detailed support on this. Having stated this, looking at the error message and screenshot, I suspect that there is a . somewhere in one of the variables used in this flow, which messes with the code of the Better Logic app.
Please check this, and if it is the case, try to contact the Developer of the Better Logic app, as I cannot help you any further than this when it comes to this app.
I trust that this answers your question, even though I might not be able to help you to a point that actually solves your issue. Iâm closing your ticket as I cannot help you beyond this point.
If you need additional support regarding Homey, please feel free to re-open your ticket by answering this email (or add the question in your other ticket).
I wish you a great day and a lot of fun with Homey!
Best Regards,
Boaz
The Athom support team.
Have you explained clearly to them that this problem occurs when you try to share the flow? Itâs not an error that occurs in the Better Logic app, itâs an error that occurs in Homeyâs âShare Flowâ system.
You can see what I wrote below. For me, itâs crystal clear.
Hi!
I have problems with Better Logic and have not been able to get help in the group.
I enclose pictures of the error message and the flow. It is a total of 3 flows.
When I try to share the flow. I only get an error message. As you can see, it applies to all three flows. I also attach a picture from Better Logic.
I do not know and have not been able to get an answer if there is a fault with Homey or Better Logic.
Yes, Boaz makes assumptions without actually reading your question or testing it himself
What do you think I should do now?
You can try and explain to him yet again that it happens when you try to share a flow, and that itâs not an application error but a Homey system error.
Literal text that you could use:
"
Boaz,
The error happens when I try to share any flow that uses a Better Logic token. The error is not generated by the Better Logic application (whose code doesnât even contain the particular error message that Iâm getting) but somewhere the Homey infrastructure (in fact, it looks very much like a MongoDB error, which definitely isnât part of Better Logic, but very likely part of Homeyâs âShareâ backend system).
Others can reproduce the problem as well.
"
Thank You very much!
If you can send images as part of your support request, I wrote a proof of concept that will trigger the same error as with Better Logic:
This is the code I used to reproduce:
new Homey.FlowToken('foo.bar', { type : 'string', title: 'foo bar token' }).register();
EDIT: also happens when you donât use periods in the flow token id:
new Homey.FlowToken('foobar', { type : 'string', title: 'foo bar token' }).register()
So something is fundamentally broken in Homeyâs backend system.
It has been brought to the attention of Athomâs development team, and they will fix it
How nice!
Did you contact them too?
I saw this morning that you wrote your test code. I sent it to Boaz, this morning.
I contacted them through Slack, they confirmed the issue and said that it will be solved. No timeline on when, though, but I assume soon.
Thatâs nice!