Hi @GibStorm,
Not exactly what you were looking for, but it triggered me to create a script/flow/device for that purpose.
You can find importable flows for a Timer, and for a Stopwatch
Flow example:
AVD device:
Script (use it with Homeyscript flow card “Run code with argument, and return number-tag”):
// Get value (milliSeconds) of a running timer; Argument = timer name.
var timerName = (args[0]);
let app = await Homey.apps.getApp({id:'nl.fellownet.chronograph'});
app.apiGet('/timers/').then(result => {
let timers = JSON.parse(result);
timers.forEach(timer => {
if ( timer.name == timerName ) {
app.apiGet('/timers/' + timer.name);
// create/update tag [timername]_duration
global.set(timer.name + "_duration", timer.duration);
//// just a check for timer name:
//console.log("TimerName: " + timer.name + " - Duration: " + timer.duration);
}
});
});
const timerDuration = global.get(timerName + "_duration");
return Number(timerDuration);