Run scripts from another script after instalation of firmware 5.0.1

I just updated Homey to the latest firmware. I came from version 4.2.0. Nearly everything works as expected.
Only calling a script with params from another script does not work anymore. In the target script the args contains the params from the call but now this is a empty list. When calling a script from a flow everything works correctly.

the syntax i used to use:

Homey.apps.getApp({id:‘com.athom.homeyscript’}).then(homeyScript => {
homeyScript.apiPost(‘script/{script_name}/run’, [param]);

Does anyone know if something has changed with this respect?

OK, found the solution by looking into api.js on github. The arguments for calling a script from another script needs now to be in the form {args: [args]}

The example on github for calling another scripts is wrong. Thats the old methode. Athom needs to change that

Better tell them directly

1 Like