isy-nodejs 1.0.1-alpha.0 → 1.0.1-alpha.1

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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "isy-nodejs",
3
3
  "description": "Node.js wrapper for ISY interface including websockets for change notifications. Fork of isy-js by Rod Toll. Designed to be used in a node.js application.",
4
4
  "license": "MIT",
5
- "version": "1.0.1-alpha.0",
5
+ "version": "1.0.1-alpha.1",
6
6
  "author": {
7
7
  "name": "Pradeep Mouli"
8
8
  },
@@ -73,5 +73,5 @@
73
73
  "publishConfig": {
74
74
  "access": "public"
75
75
  },
76
- "gitHead": "c7e15d878acf5e06800ffe49ab3ca75075a84f8d"
76
+ "gitHead": "c24824857ec59fdb46f09af99c823f71b9a8e5ea"
77
77
  }
package/src/ISY.ts CHANGED
@@ -747,7 +747,10 @@ export class ISY extends EventEmitter implements Disposable {
747
747
 
748
748
  if (d) {
749
749
  newDevice = new d(this, nodeInfo) as ISYDeviceNode<any,any,any,any>;
750
- newDevice.productName = d.name;
750
+ }
751
+ if (m) {
752
+ newDevice = newDevice ?? new m.class(this, nodeInfo) as unknown as ISYDeviceNode<any,any,any,any>;
753
+ newDevice.productName = m.name;
751
754
  newDevice.model = `(${m.modelNumber}) ${m.name} v.${m.version}`;
752
755
  newDevice.modelNumber = m.modelNumber;
753
756
  newDevice.version = m.version;