diff --git a/common/src/deferred.ts b/common/src/deferred.ts index 5d541f8003..06b611b693 100644 --- a/common/src/deferred.ts +++ b/common/src/deferred.ts @@ -7,7 +7,7 @@ export class Deferred { this.resolve(await p); } catch (e) { - this.reject(e); + this.reject(e as Error); } } promise = new Promise((resolve, reject) => { diff --git a/plugins/core/src/automation-actions.ts b/plugins/core/src/automation-actions.ts index bc22656ed2..30665e873c 100644 --- a/plugins/core/src/automation-actions.ts +++ b/plugins/core/src/automation-actions.ts @@ -22,6 +22,7 @@ addAction(ScryptedInterface.OnOff, { on: { title: 'Turn On/Off', type: 'boolean', + immediate: true, } }, async function invoke(device: ScryptedDevice & OnOff, storageSettings) { return storageSettings.on ? device.turnOn() : device.turnOff();