# Logic tag + xx?

**URL:** <https://community.homey.app/t/logic-tag-xx/30188>\
**Category:** Questions & Help\
**Created:** [May 21, 2020, 12:13pm UTC](https://community.homey.app/t/logic-tag-xx/30188 "2020-05-21T12:13:35Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![vaderag](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/vaderag/32/150_2.png) [@vaderag](https://community.homey.app/u/vaderag)\
**Post date:** [May 21, 2020, 12:13pm UTC](https://community.homey.app/t/logic-tag-xx/30188/1 "2020-05-21T12:13:35Z")

</div>

So, it’s high humidity here today and this has meant a few flows that measure increased humidity in a room have kicked in unnecessarily

I’d like to therefore include logic where I compare sensor reading to weather humidity + 5 (for example)

I can only seem to compare the tags directly tho without modifier - is there a way to do this?

---

<div class="post-metadata">

**Author:** ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)\
**Post date:** [May 21, 2020, 12:41pm UTC](https://community.homey.app/t/logic-tag-xx/30188/2 "2020-05-21T12:41:14Z")

</div>

You can calculate a new variable (humidity + 5).  
Then you can use this new variable for comparison.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/e/d/ed06269b331ebb5b1e25228d768f783459868545.jpeg)

I hope I understand you correctly.

---

<div class="post-metadata">

**Author:** ![vaderag](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/vaderag/32/150_2.png) [@vaderag](https://community.homey.app/u/vaderag)\
**Post date:** [May 21, 2020, 12:43pm UTC](https://community.homey.app/t/logic-tag-xx/30188/3 "2020-05-21T12:43:42Z")

</div>

Odd, I tried that and it wasn’t letting me add anything into the box when I’d added the tag. Perhaps I wasn’t pressing in the right place!  
Will try again

---

<div class="post-metadata">

**Author:** ![vaderag](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/vaderag/32/150_2.png) [@vaderag](https://community.homey.app/u/vaderag)\
**Post date:** [May 21, 2020, 1:01pm UTC](https://community.homey.app/t/logic-tag-xx/30188/4 "2020-05-21T13:01:04Z")

</div>

Found it - can’t do the logic in the middle, has to be set before hand!

---

<div class="post-metadata">

**Author:** ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)\
**Post date:** [May 21, 2020, 1:25pm UTC](https://community.homey.app/t/logic-tag-xx/30188/5 "2020-05-21T13:25:57Z")

</div>

You can do what you want, but without spaces.

![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/b/5bf3e474cf47781da87eb9da76bd1d1bee90a5ec.jpeg)

---

<div class="post-metadata">

**Author:** ![vaderag](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/vaderag/32/150_2.png) [@vaderag](https://community.homey.app/u/vaderag)\
**Post date:** [May 21, 2020, 1:27pm UTC](https://community.homey.app/t/logic-tag-xx/30188/6 "2020-05-21T13:27:59Z")

</div>

Sorry, my bad explanation. You can’t do it mid flow (so you cant say IF a variable changed AND Tag \> Humidity+5 THEN xyZ)

You have to set a logic variable to Humidity+5 first and compare against that new variable

---

<div class="post-metadata">

**Author:** ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)\
**Post date:** [May 21, 2020, 1:31pm UTC](https://community.homey.app/t/logic-tag-xx/30188/7 "2020-05-21T13:31:41Z")

</div>

Yes, that’s right, that’s what I mean with „new variable“.
