Detect a flow has run

The trigger count for each flow is contained within the results of Homey.flow.getFlows().

For example, to show all flows and their trigger count:

const flows = await Homey.flow.getFlows();

for (const [ id, flow ] of Object.entries(flows)) {
  const { name, triggerCount } = flow;

  console.log(name, ':', triggerCount);
}

So you could periodically run a Homeyscript that would collect all the trigger counts, compare them with the previous run, and have a list of flows that have run since that last run.

Nice idea, @Peter_Kawa! :+1:t2:

4 Likes