homebridge-nb 1.2.12 → 1.2.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -231,6 +231,9 @@ class Bridge extends homebridgeLib.AccessoryDelegate {
231
231
  response = await this.client.list()
232
232
  for (const device of response.body) {
233
233
  this.debug('device: %j', device)
234
+ if (device.firmwareVersion == null) { // Issue 93.
235
+ continue
236
+ }
234
237
  const id = device.nukiId.toString(16).toUpperCase()
235
238
  switch (device.deviceType) {
236
239
  case NbClient.DeviceTypes.SMARTLOCK:
@@ -342,12 +345,11 @@ class DoorSensor extends NbAccessory {
342
345
  params.model = 'Door Sensor'
343
346
  super(bridge, params)
344
347
  this.service = new NbService.DoorSensor(this)
345
- this.historyService = new homebridgeLib.ServiceDelegate.History.Contact(
346
- this, { name: this.name },
347
- this.service.characteristicDelegate('contact'),
348
- this.service.characteristicDelegate('timesOpened'),
349
- this.service.characteristicDelegate('lastActivation')
350
- )
348
+ this.historyService = new homebridgeLib.ServiceDelegate.History.Contact(this, {
349
+ contactDelegate: this.service.characteristicDelegate('contact'),
350
+ timesOpenedDelegate: this.service.characteristicDelegate('timesOpened'),
351
+ lastActivationDelegate: this.service.characteristicDelegate('lastActivation')
352
+ })
351
353
  }
352
354
 
353
355
  update (state) {
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "displayName": "Homebridge NB",
5
5
  "author": "Erik Baauw",
6
6
  "license": "Apache-2.0",
7
- "version": "1.2.12",
7
+ "version": "1.2.14",
8
8
  "keywords": [
9
9
  "homebridge-plugin",
10
10
  "homekit",
@@ -18,11 +18,11 @@
18
18
  "nb": "cli/nb.js"
19
19
  },
20
20
  "engines": {
21
- "homebridge": "^1.5.1",
22
- "node": "^18.12.0"
21
+ "homebridge": "^1.6.0",
22
+ "node": "^18.12.1"
23
23
  },
24
24
  "dependencies": {
25
- "homebridge-lib": "~5.7.0"
25
+ "homebridge-lib": "~6.0.2"
26
26
  },
27
27
  "scripts": {
28
28
  "prepare": "standard",