From 872e2674b54e54f93e58a5ff98188bf0143de5bd Mon Sep 17 00:00:00 2001 From: Dave Nicolson Date: Thu, 24 Oct 2024 18:48:57 +0200 Subject: [PATCH] Fix characteristic notification --- src/device.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/device.ts b/src/device.ts index 24b5f0d..31b7d68 100644 --- a/src/device.ts +++ b/src/device.ts @@ -229,7 +229,7 @@ export class SwitchbotDevice extends EventEmitter { throw new Error('No notify characteristic was found.') } await char.subscribeAsync() - char.on('data', this.onNotify) + char.on('data', (buf: Buffer) => this.onNotify(buf)) } /**