# V2.0, unable to set numerical Logic variable with webhook

**URL:** <https://community.homey.app/t/v2-0-unable-to-set-numerical-logic-variable-with-webhook/7365>\
**Category:** Questions & Help\
**Created:** [January 19, 2019, 10:58am UTC](https://community.homey.app/t/v2-0-unable-to-set-numerical-logic-variable-with-webhook/7365 "2019-01-19T10:58:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Willy](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/willy/32/9673_2.png) [@Willy](https://community.homey.app/u/Willy)\
**Post date:** [January 19, 2019, 10:58am UTC](https://community.homey.app/t/v2-0-unable-to-set-numerical-logic-variable-with-webhook/7365/1 "2019-01-19T10:58:12Z")

</div>

I used to set variables with Better Logic via their API but that has effectively been broken by V2.0.

I’m now trying to do the same with the build in Logic. From a webapp my wife can set the desired temperature for the living room. This is a numerical value and a flow should check if the value is higher than the measured temp and then turn on the heating when needed. But via webhook it’s not possible to put the tag value into a numerical variable, only text variables van be used, and those can’t be used in numerical comparisons.

This all means that Homey is now on the low end of the WAF scale.

---

<div class="post-metadata">

**Author:** ![Willy](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/willy/32/9673_2.png) [@Willy](https://community.homey.app/u/Willy)\
**Post date:** [January 19, 2019, 1:05pm UTC](https://community.homey.app/t/v2-0-unable-to-set-numerical-logic-variable-with-webhook/7365/2 "2019-01-19T13:05:33Z")

</div>

Figured out how to get the Better Logic API working again. The URL and parameters have changed and you need to update the bearer token.

Get all variables using GET method:  
http://\<homey\_ip\>/api/manager/apps/app/net.i-dev.betterlogic/setting/variables  
with the authorization header of course:  
Authorization: Bearer -your bearer token-

Set a variable using PUT method:  
http://\<homey\_ip\>/api/manager/apps/app/net.i-dev.betterlogic/setting/changedvariables  
with the authorization header:  
Authorization: Bearer -your bearer token-  
and the following JSON:  
{“value”:{“variable”:{“name”:“variable\_name”,“value”:“desired\_value”,“type”:“number”,“remove”:false}}}
