# Variable not totally updated

**URL:** <https://community.homey.app/t/variable-not-totally-updated/82154>\
**Category:** Flows\
**Tags:** homeyscript, homey-pro\
**Created:** [June 11, 2023, 4:58pm UTC](https://community.homey.app/t/variable-not-totally-updated/82154 "2023-06-11T16:58:07Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Caseda](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/caseda/32/138695_2.png) [@Caseda](https://community.homey.app/u/Caseda)\
**Post date:** [June 11, 2023, 9:29pm UTC](https://community.homey.app/t/variable-not-totally-updated/82154/6 "2023-06-11T21:29:30Z")

</div>

Global = for (all) HomeyScript scipts  
Tag = Homey Tags/Tokens to be used in flows.

Yes it is possible to change Logic variables with HomeyScript, there is already some topics about it on the forum ~~somewhere~~.  
Found 1, not the one I first was thinking of, but has the same end results with the correct API points:

> [@Setting Logic Variable by HomeyScript](https://community.homey.app/t/14819):
>
> I Try to set value on a better logic variable follow other forum. I find out the varible’s ID and on “Web API Playground” i wrote the follow instruction: Homey.logic.updateVariable({id: “2de431c4-ddc1-49d8-b98b-536d9acd1d59”, variable: {“value” :48}}) Response “root”:{5 items “\_\_athom\_api\_type”:string"HomeyAPI.ManagerLogic.Variable" “id”:string"2de431c4-ddc1-49d8-b98b-536d9acd1d59" “name”:string"Power\_Surplus" “type”:string"number" “value”:int48} The variable is set . … Instead, Writi…

---

_[View the full topic](https://community.homey.app/t/variable-not-totally-updated/82154)._
