We are looking for some test users for the new HomeyScript version HomeyScript | Homey that uses our new homey-api - npm library under the hood for new scripts.
I’m trying to migrate a script in which I fetch variables from the app “Better Logic Library”, but I get an error saying “TypeError: BLApp.apiGet is not a function”. I can’t find anything in the migration guide regarding this and I don’t know if the error is in my code, the HS-app or that the BLL-app needs to be updated to support this.
My code (which works fine in the classic script) is:
let BLApp = await Homey.apps.getApp({id: “net.i-dev.betterlogic”});
let BLVar = await BLApp.apiGet(“/Ecodan_DHW_Temp_Offset/”);
Step 6, not a day too early… I have been struggling A LOT with the deprecated apiPost function.
Have a look at this screenshot, you’re saying that “apiPost” has been replaced with “post”, but I still get a recommendation to use apiPost (that does not work)?
Reading and writing to the same fields in a virtual device, without any async functions, worked perfectly before.
If you do it now, the HomeyScript app crashes. The app is really prone to crash when you do read and write operations like this in the same script - it’s the same if you try to write through the runFlowCardAction function.
Why are you creating a capability listener without a callback if you want to read the value of a capability you can just do currentValueDevice2.capabilitiesObj.measure_devicecapabilities_number-custom_35.number3.value
Device - Homey Web API (athombv.github.io) as you can see here you are calling the function wrong. Also using a listener in a script is not needed since a script just runs to completion and destroys the listeners.
because at first I thought I can specify certain props and it will filter by it, but it just returns all devices. Also giving it a complete parameter it does not do anything. Please either expand on the documentation or remove such parameters if they serve no function.