PatrickSannes / BetterLogic

A advanced logic library for homey
8 stars 8 forks source link

[Bug] Possible error in "Decrement variable" flow card #18

Closed cbho closed 6 years ago

cbho commented 6 years ago

Have a flow using the action flow card "Decrement variable" like this: image

However, had a lot of trouble with calculations not being right (a flow for keeping track of how many persons are on different stories in my house) as the number of persons on the floors kept increasing (when somebody walked around in the house, no guests arrived ;-)) - thought it was a problem with the overall nature of my setup with figuring out which direction people go, placement of sensors etc.

But: Changing the flow card to a mathjs card with a "-1" calculation solved the problem: image

Therefore: Could it be a bug in the "Decrement variable" card? (Alternatively: some bug in Homey core when doing calculations?)

PatrickSannes commented 6 years ago

Can you show your definition of the variable?

On 7 Jan 2018 13:48, "Christian Bjerre Høyer" notifications@github.com wrote:

Have a flow using the action flow card "Decrement variable" like this: [image: image] https://user-images.githubusercontent.com/29979509/34649334-72a26f00-f3ad-11e7-89fc-187798276aea.png

However, had a lot of trouble with calculations not being right (a flow for keeping track of how many persons are on different stories in my house) as the number of persons on the floors kept increasing (when somebody walked around in the house, no guests arrived ;-)) - thought it was a problem with the overall nature of my setup with figuring out which direction people go, placement of sensors etc.

But: Changing the flow card to a mathjs card with a "-1" calculation solved the problem: [image: image] https://user-images.githubusercontent.com/29979509/34649531-63eeb3ca-f3b1-11e7-8e09-3dac4b64f35f.png

Therefore: Could it be a bug in the "Decrement variable" card? (Alternatively: some bug in Homey core when doing calculations?)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/PatrickSannes/BetterLogic/issues/18, or mute the thread https://github.com/notifications/unsubscribe-auth/ABxbDZb91_xHqrZewjQ409mkvGWQMM3-ks5tIL0igaJpZM4RVowO .

cbho commented 6 years ago

image

PatrickSannes commented 6 years ago

Did you select the number from the list or just typed it. This is a known issue in the cards. When only typing it it is not selecting it.

On 7 Jan 2018 13:51, "Christian Bjerre Høyer" notifications@github.com wrote:

[image: image] https://user-images.githubusercontent.com/29979509/34649563-da9085e4-f3b1-11e7-88b6-10c4e3fe871d.png

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/PatrickSannes/BetterLogic/issues/18#issuecomment-355820782, or mute the thread https://github.com/notifications/unsubscribe-auth/ABxbDVi-1gjegESVwIbHhzHb1rZBNVyUks5tIL3RgaJpZM4RVowO .

cbho commented 6 years ago

Was certain that I did select from the list as I have read about that problem - and also went through flows before making the issue. However, have been through flows again and made sure all variables are chosen like this - and cannot reproduce the error as it was - so that might have been the problem afterall. If not, I'll re-open. Thanks, Chr.