From 1b0a9496de7d83169139809d407ae045741ec618 Mon Sep 17 00:00:00 2001 From: Dave Nicolson Date: Fri, 9 Feb 2024 19:48:02 +0100 Subject: [PATCH] Revert "Update switchbot.ts" This reverts commit 9fabc815c81126aef3e05d0e224a8c34730f50f0. --- src/switchbot.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/switchbot.ts b/src/switchbot.ts index 39677222..1026ff68 100644 --- a/src/switchbot.ts +++ b/src/switchbot.ts @@ -113,7 +113,7 @@ export class SwitchBot { * An array will be passed to the `resolve()`, which includes * `SwitchbotDevice` objects representing the found devices. * ---------------------------------------------------------------- */ - async discover(params: params = {}) { + discover(params: params = {}) { const promise = new Promise((resolve, reject) => { // Check the parameters const valid = ParameterChecker.check( @@ -399,7 +399,7 @@ export class SwitchBot { * - Promise object * Nothing will be passed to the `resolve()`. * ---------------------------------------------------------------- */ - async startScan(params?: params) { + startScan(params?: params) { const promise = new Promise((resolve, reject) => { // Check the parameters const valid = ParameterChecker.check( @@ -491,7 +491,7 @@ export class SwitchBot { * [Return value] * - none * ---------------------------------------------------------------- */ - async stopScan() { + stopScan() { this.noble.removeAllListeners('discover'); this.noble.stopScanning(); } @@ -507,7 +507,7 @@ export class SwitchBot { * - Promise object * Nothing will be passed to the `resolve()`. * ---------------------------------------------------------------- */ - async wait(msec: number) { + wait(msec: number) { return new Promise((resolve, reject) => { // Check the parameters const valid = ParameterChecker.check(