Skip to content

Commit

Permalink
Fix characteristic notification
Browse files Browse the repository at this point in the history
  • Loading branch information
dnicolson authored Oct 24, 2024
1 parent 4b5b4e9 commit 872e267
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/device.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}

/**
Expand Down

0 comments on commit 872e267

Please sign in to comment.