# I need to set a variable in BetterLogic from a HomeyScript

**URL:** <https://community.homey.app/t/i-need-to-set-a-variable-in-betterlogic-from-a-homeyscript/112724>\
**Category:** Developers\
**Created:** [July 11, 2024, 10:04am UTC](https://community.homey.app/t/i-need-to-set-a-variable-in-betterlogic-from-a-homeyscript/112724 "2024-07-11T10:04:02Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Michael\_Weller](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/michael_weller/32/81907_2.png) [@Michael\_Weller](https://community.homey.app/u/Michael_Weller)\
**Post date:** [July 12, 2024, 12:10pm UTC](https://community.homey.app/t/i-need-to-set-a-variable-in-betterlogic-from-a-homeyscript/112724/3 "2024-07-12T12:10:40Z")

</div>

Finanly I managed it…  
Not much useable docu out there ☹

If anyone is searching for the same,  
here a working extract from me code:

```auto
let BLApp = await Homey.apps.getApp({id:"net.i-dev.betterlogic" });
const resBLput = await BLApp.put({path: '/BatteryLoadState/' + "100"});
console.log ("setVar", resBLput)

let check = await BLApp.get({path: '/BatteryLoadState'});
console.log("getVar", check);

```

---

_[View the full topic](https://community.homey.app/t/i-need-to-set-a-variable-in-betterlogic-from-a-homeyscript/112724)._
