Setting Logic Variable by HomeyScript

@Satoer The good news is, you can make your own variables in HomeyScript and they also can be used in your Flows, here is my example:

// my12HoursClock
let sys = await Homey.system.getInfo();
var theTime = new Date(sys.date);
var theHour = theTime.getHours();
if (theHour > 12) { theHour = theHour - 12};
await setTagValue("klok12h", {type:"number", title: "Klok12H"}, theHour );
//console.log('TheHour',theHour);
return(true);

image