homebridge-deconz 0.0.25 → 0.0.26

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.
package/cli/deconz.js CHANGED
@@ -711,12 +711,15 @@ class Main extends homebridgeLib.CommandLineTool {
711
711
  .on('changed', (rtype, rid, body) => {
712
712
  let resource = '/' + rtype + '/' + rid
713
713
  if (Object.keys(body).length === 1) {
714
- if (body.state != null) {
715
- resource += '/state'
716
- body = body.state
714
+ if (body.capabilities != null) {
715
+ resource += '/capabilities'
716
+ body = body.capabilities
717
717
  } else if (body.config != null) {
718
718
  resource += '/config'
719
719
  body = body.config
720
+ } else if (body.state != null) {
721
+ resource += '/state'
722
+ body = body.state
720
723
  }
721
724
  }
722
725
  this.log('%s: %s', resource, this.jsonFormatter.stringify(body))
@@ -91,12 +91,14 @@ class WsClient extends events.EventEmitter {
91
91
  case 'changed':
92
92
  if (obj.r !== null && obj.id !== null) {
93
93
  let body
94
- if (obj.state != null) {
95
- body = { state: obj.state }
94
+ if (obj.attr != null) {
95
+ body = obj.attr
96
+ } else if (obj.capabilities != null) {
97
+ body = { capabilities: obj.capabilities }
96
98
  } else if (obj.config != null) {
97
99
  body = { config: obj.config }
98
- } else if (obj.attr != null) {
99
- body = obj.attr
100
+ } else if (obj.state != null) {
101
+ body = { state: obj.state }
100
102
  }
101
103
  /** Emitted when a `changed` notification has been received.
102
104
  *
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "displayName": "Homebridge deCONZ",
5
5
  "author": "Erik Baauw",
6
6
  "license": "Apache-2.0",
7
- "version": "0.0.25",
7
+ "version": "0.0.26",
8
8
  "keywords": [
9
9
  "homebridge-plugin",
10
10
  "homekit",
@@ -25,7 +25,7 @@
25
25
  "node": "^18.12.0"
26
26
  },
27
27
  "dependencies": {
28
- "homebridge-lib": "~5.7.1",
28
+ "homebridge-lib": "~5.7.2",
29
29
  "ws": "^8.10.0",
30
30
  "xml2js": "~0.4.23"
31
31
  },