[Request] Script to get overview of used timers in Chronograph

Chronograph timers are created when needed and destroyed when stopped. The only way to get a list of timers is looping through flows

The following example produces a dictionary of timer-names used in flows along with it’s type (timer, stopwatch etc)

const flowsDic = await Homey.flow.getFlows();
const flows = Object.values(flowsDic)
const actions = flows.map(f => f.actions.filter(a => a.uri === 'homey:app:nl.fellownet.chronograph')).flat()
log(actions.reduce((a,x) => ({...a, [x.args.name]:x.id.split('_')[0]}), {}))
2 Likes