I am trying to create a script to restart the Google Chromecast app on a regular basis as it keeps disconnecting from devices. This is what I have:
const appName = 'Google ChromeCast';
const app = await Homey.apps.getApp({ name: appName });
await app.restart({ id: 'homey:app:com.google.chromecast@2.0.0' });
But I get this error:
Script Error
RestartChromeCast.js:3
await app.restart({ id: homey:app:com.google.chromecast@2.0.0 });
^
SyntaxError: Unexpected token ‘:’
at new Script (node:vm:100:7)
at HomeyScriptApp.runScript (/app.js:483:23)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Object.runScript (/api.js:30:22)