[APP][Pro] Device Capabilities - Enhance the capabilities of devices

No, run this in the WebApi Playground.
Change the deviceID
This will remove ALL insights from that device!

async function exe(deviceId) {
  let a = await Homey.insights.getLogs();
  a = a.filter((x)=>x.uri=='homey:device:' + deviceId);
  for(var i=0;i<a.length;i++) {
    await Homey.insights.deleteLog(a[i]);
  }
  console.log(a);
}

exe('05507935-ab90-45d1-9cc7-87e0e0917013');


I have just created a ticket to create a better solution.
QlusterIT / nl.qluster-it.DeviceCapabilities / issues / #10 - Create a view in App Settings to create a script to remove unused/selected insights — Bitbucket

3 Likes