hi, thanx for your idea/example.
i am very close to finish. but the last step does not work. i read a better logic variable, do slicing an want to write it back, but the variable does not change.
do you have an idea, here is my code:
// my script
let BLApp = await Homey.apps.getApp({id:‘net.i-dev.betterlogic’ });
//set Better Logic Variable
//BLApp.apiPut(“VariableName/value”);
//get Better Logic variable
let tmp = await BLApp.apiGet(‘CameraLink’);
var link = tmp.value;
var laenge = link.length;
var res = link.slice(0,laenge-17);
//var link = await BLApp.apiGet(‘CameraLink’);
//console.log(res) ;
//var res = link.slice(0,link.Length()-1);
//console.log(res) ;
//set Better Logic Variable
//BLApp.apiPut(“CameraLink/”+res);
BLApp.apiPut(CameraLink/${res}
);
//Hi, ${user.name}!
//BLApp.apiPut(‘CameraLink/NEU’);
//console.log(tmp) ;
//console.log(link.name) ;
//console.log(link.type) ;
//console.log(link.value) ;
//console.log(CameraLink/${res}
)
return(true);