# Logic block in Advanced Flow: mathematic calculation of Variable/Tag values

**URL:** <https://community.homey.app/t/logic-block-in-advanced-flow-mathematic-calculation-of-variable-tag-values/96762>\
**Category:** Ideas & Suggestions\
**Tags:** featurerequest, homey-pro, advancedflow\
**Created:** [December 4, 2023, 11:22am UTC](https://community.homey.app/t/logic-block-in-advanced-flow-mathematic-calculation-of-variable-tag-values/96762 "2023-12-04T11:22:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![And](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/and/32/131408_2.png) [@And](https://community.homey.app/u/And)\
**Post date:** [December 4, 2023, 11:22am UTC](https://community.homey.app/t/logic-block-in-advanced-flow-mathematic-calculation-of-variable-tag-values/96762/1 "2023-12-04T11:22:53Z")

</div>

Hello @homey,  
I have a feature request.

User Voice: As a Advanced Flow user I want to increase/decrease a given thermostat temperature by a certain value to increase/decrease a thermostat temperature.

User Voice for the logic block: As a Advances Flow user I want to increase/decrease a given Variable/Tag value by a defined Variable/Tag/value to use the new value in a following building block.

Idea: A logic block, which adds or substrates a given value from a Tag/value and provides it a a new Tag in the flow.  
What should be customisable in the logic block: Tag/value with the existing value & add/substract & the value to add/substract as a value/Tag/variable.  
Possible wording on the Logic block: Read (Variable/Tag) and (add/substract) (Variable/Tag/Value).

What do I want to use it for:

- Wen a hue switch button is pressed
- Read the currently set temperature of the thermostat Eurotoronic Sprite Z-Wave (20.5 degree)
- increase it by 0.5 degree.
- send the new value to the thermostat as new temperature (21 degree) by using the block “set the temperature (value)”

p.s.  
I m aware of the calculation logic block.  
But I am struggling to get the thermostat value into it.  
And I am forced to define a “text” (= Tag) where the new value should be written to.

---

<div class="post-metadata">

**Author:** ![DirkH](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkh/32/78952_2.png) [@DirkH](https://community.homey.app/u/DirkH)\
**Post date:** [December 4, 2023, 12:42pm UTC](https://community.homey.app/t/logic-block-in-advanced-flow-mathematic-calculation-of-variable-tag-values/96762/2 "2023-12-04T12:42:00Z")

</div>

Hi @And ,  
I am not sure, if I understand what you want.  
Probably you cannot add something to a device property. But if you have a variable, you can add/substract/multiply/divide and store the result in the same variable.

 ![TestFormula](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/2/c/2c3f6323e86b0d4bba77886fb8a9e31a02231362.jpeg)  
If that is not sufficient you may use temporary variables, which are forgotten after the flow.  
[https://community.homey.app/t/app-pro-temporary-variables/67482](https://community.homey.app/t/app-pro-temporary-variables/67482)

---

<div class="post-metadata">

**Author:** ![And](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/and/32/131408_2.png) [@And](https://community.homey.app/u/And)\
**Post date:** [December 4, 2023, 4:18pm UTC](https://community.homey.app/t/logic-block-in-advanced-flow-mathematic-calculation-of-variable-tag-values/96762/3 "2023-12-04T16:18:45Z")

</div>

Hi @DirkH,  
thank you for the tip  
I will try out the App Temporary-variable. Looks like a good workaround to avoid too much Variable.

Currently my flow looks like this:

 ![Screenshot 2023-12-04 at 17.15.52](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/8/8/88fa55471fb08a8434050b05834becd4a8861ef6.png)

---

<div class="post-metadata">

**Author:** ![And](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/and/32/131408_2.png) [@And](https://community.homey.app/u/And)\
**Post date:** [December 4, 2023, 4:30pm UTC](https://community.homey.app/t/logic-block-in-advanced-flow-mathematic-calculation-of-variable-tag-values/96762/4 "2023-12-04T16:30:08Z")

</div>

My solution with Temporary variable, which works:

 ![Screenshot 2023-12-04 at 17.28.12](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/3/7363cc9124fa6211526923659cff17fe67d90faa.jpeg)
