The programmer in me likes to display summaries after execution and possibly debug info. How ever, javascript is something I’ve never felt the urge to play with…
Could someone please point me in the right direction for declaring a local variable, append to it and print it on flow end?
Maybe you’d like to get a push notification of the summary you’re after?
Here’s how you can use Homeyscript to output whatever you want as a push notification:
//Send push notification through Homeyscript (Only tested on a Homey with 1 account)
const usrs = await Homey.users.getUserMe();
let idArr = Object.entries(usrs);
const usrID = idArr[1][1]
const athomID = idArr[3][1]
await Homey.flow.runFlowCardAction({
uri: "homey:manager:mobile",
id: "push_text" ,
args: {
"user": {
"id": usrID,
"athomId": athomID
},
//Change the sample text and the variables to your needs
"text": "Sample text line 1: " +varResult1
+"\n"+"Sample text line 2: " + varResult2
},
});