Skip to content

Commit df6481f

Browse files
v1.7.3 (#176)
## [Version 1.7.3](https://github.com/OpenWonderLabs/node-switchbot/releases/tag/v1.7.3) (2023-01-05) ## What's Changed - Improve error handling, Thanks [@dnicolson](https://github.com/dnicolson/). [#175](#175) - Housekeeping and update dependencies **Full Changelog**: v1.7.2...v1.7.3
1 parent 296dd3d commit df6481f

File tree

5 files changed

+65
-45
lines changed

5 files changed

+65
-45
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
All notable changes to this project will be documented in this file. This project uses [Semantic Versioning](https://semver.org/)
44

5+
## [Version 1.7.3](https://github.com/OpenWonderLabs/node-switchbot/releases/tag/v1.7.3) (2023-01-05)
6+
7+
## What's Changed
8+
9+
- Improve error handling, Thanks [@dnicolson](https://github.com/dnicolson/). [#175](https://github.com/OpenWonderLabs/node-switchbot/pull/175)
10+
- Housekeeping and update dependencies
11+
12+
**Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v1.7.2...v1.7.3
13+
514
## [Version 1.7.2](https://github.com/OpenWonderLabs/node-switchbot/releases/tag/v1.7.2) (2022-12-26)
615

716
## What's Changed

lib/switchbot-device.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,9 @@ class SwitchbotDevice {
443443

444444
this._connect()
445445
.then(() => {
446+
if (!this._chars) {
447+
return reject("No characteristics available.");
448+
}
446449
return this._write(this._chars.write, req_buf);
447450
})
448451
.then(() => {

lib/switchbot.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,9 @@ class Switchbot {
132132
for (let addr in peripherals) {
133133
device_list.push(peripherals[addr]);
134134
}
135-
resolve(device_list);
135+
if (device_list.length) {
136+
resolve(device_list);
137+
}
136138
};
137139

138140
// Set a handler for the 'discover' event

package-lock.json

Lines changed: 48 additions & 42 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "node-switchbot",
3-
"version": "1.7.2",
3+
"version": "1.7.3",
44
"description": "The node-switchbot is a Node.js module which allows you to control your Switchbot Devices through Bluetooth (BLE).",
55
"main": "./lib/switchbot.js",
66
"files": [
@@ -34,7 +34,7 @@
3434
},
3535
"readmeFilename": "README.md",
3636
"dependencies": {
37-
"@abandonware/noble": "1.9.2-15"
37+
"@abandonware/noble": "^1.9.2-19"
3838
},
3939
"devDependencies": {
4040
"npm-check-updates": "^16.6.2"

0 commit comments

Comments
 (0)