# Variables not updating correct in flows

**URL:** <https://community.homey.app/t/variables-not-updating-correct-in-flows/53460>\
**Category:** Questions & Help\
**Created:** [October 21, 2021, 4:01am UTC](https://community.homey.app/t/variables-not-updating-correct-in-flows/53460 "2021-10-21T04:01:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Storm72](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/storm72/32/35593_2.png) [@Storm72](https://community.homey.app/u/Storm72)\
**Post date:** [October 21, 2021, 4:01am UTC](https://community.homey.app/t/variables-not-updating-correct-in-flows/53460/1 "2021-10-21T04:01:52Z")

</div>

First i am using the new Bridge.

When running this flow a get a strange resultate.

![2021-10-21_05h30_25](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/b/6/b68c4789631ac592ed22dba0074b6e5301716281.png)

If this 2 variables Initial value is “Oldtemp=10” and “Tempdiff=0” it should change like this:

Oldtemp=9, Tempdiff=9  
Oldtemp=8, Tempdiff=8  
Oldtemp=7, Tempdiff=7  
.  
.  
But i get this  
Oldtemp=10, Tempdiff=0  
Oldtemp=0, Tempdiff=9  
Oldtemp=9, Tempdiff=-1  
Oldtemp=-1, Tempdiff=8  
Oldtemp=8, Tempdiff=-2

It´s like “Oldtemp” is updated with “Tempdiff” of the run before not the current.

Is there something wrong with flow or is this a bug ?

---

<div class="post-metadata">

**Author:** ![CyberSponk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/cybersponk/32/8334_2.png) [@CyberSponk](https://community.homey.app/u/CyberSponk)\
**Post date:** [October 21, 2021, 4:19am UTC](https://community.homey.app/t/variables-not-updating-correct-in-flows/53460/2 "2021-10-21T04:19:01Z")

</div>

You need a delay for your second (1 second) and third (2 seconds) card. The order of the card is not how Homey is processing the cards.

**Edit**  
Second card \> delay 2 seconds, Third card \> delay 1 second

Re-Ordered cards: First card (no delay) \> Calculate, Second card (delay 1s) \> Message, Third card (delay 2s) \> Set value for next run of the Flow
