# Setting Logic Variable by HomeyScript

**URL:** <https://community.homey.app/t/setting-logic-variable-by-homeyscript/14819>\
**Category:** Questions & Help\
**Created:** [June 25, 2019, 3:11pm UTC](https://community.homey.app/t/setting-logic-variable-by-homeyscript/14819 "2019-06-25T15:11:16Z")\
**Posts on this page:** 1\
**Showing post:** 20

<div class="post-metadata">

**Author:** ![JPe4619](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jpe4619/32/9017_2.png) [@JPe4619](https://community.homey.app/u/JPe4619)\
**Post date:** [July 1, 2019, 11:03am UTC](https://community.homey.app/t/setting-logic-variable-by-homeyscript/14819/20 "2019-07-01T11:03:34Z")

</div>

You can also create the variable in BetterLogic and update it like:

> let BLApp = await Homey.apps.getApp({id:“net.i-dev.betterlogic” });  
> BLApp.apiPut(‘Klok12h/’ + theHour);

---

_[View the full topic](https://community.homey.app/t/setting-logic-variable-by-homeyscript/14819)._
