diff --git a/README.md b/README.md index 18aea2f..945b66b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # homebridge-nest -Nest plug-in for [Homebridge](https://github.com/nfarina/homebridge) using the native Nest API. See what's new in [release 4.4.4](https://github.com/chrisjshull/homebridge-nest/releases/tag/v4.4.4). +Nest plug-in for [Homebridge](https://github.com/nfarina/homebridge) using the native Nest API. See what's new in [release 4.4.6](https://github.com/chrisjshull/homebridge-nest/releases/tag/v4.4.6). Integrate your Nest Thermostat (including Nest Temperature Sensors), Nest Protect, and Nest x Yale Lock devices into your HomeKit system. Both Nest Accounts (pre-August 2019) and Google Accounts are supported. @@ -131,6 +131,7 @@ Set `"options"` in `config.json` to an array of strings chosen from the followin * `"Protect.Disable"` - exclude Nest Protects from HomeKit * `"Protect.MotionSensor.Disable"` - disable *MotionDetector* accessory for Nest Protects * `"Lock.Disable"` - exclude Nest x Yale Locks from HomeKit +* `"Nest.FieldTest.Enable"` - set this option if you're using a Nest Field Test account (experimental) By default, options set apply to all devices. To set an option for a specific device only, add `.device_id` to the corresponding `option`, where `device_id` is shown in the Homebridge logs, or in HomeKit itself as *Serial Number* in the Settings page for your device. For example, to disable one specific thermostat with serial number 09AC01AC31180349, add `"Thermostat.Disable.09AC01AC31180349"` to the `"options"` array. diff --git a/index.js b/index.js index 1f99597..fcb2dd1 100644 --- a/index.js +++ b/index.js @@ -46,11 +46,10 @@ class NestPlatform { const conn = new NestConnection(this.config, this.log, verbose, fieldTestMode); - try { - await conn.auth(); + if (await conn.auth()) { return conn; - } catch(error) { - throw('Unable to connect to Nest service.', error); + } else { + throw('Unable to authenticate with Google/Nest.'); } } diff --git a/package.json b/package.json index f9394a9..1d44a0e 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "prepublishOnly": "npm run lint", "preversion": "npm run lint" }, - "version": "4.4.4", + "version": "4.4.6", "warnings": [ { "code": "ENOTSUP", @@ -44,7 +44,7 @@ "node": ">=7.0.0", "homebridge": ">=0.2.5" }, - "pkgid": "homebridge-nest@4.4.4" + "pkgid": "homebridge-nest@4.4.6" } ] }