added api site output when enabling debug log
This commit is contained in:
parent
c36bea1c5c
commit
bedcd550ad
1 changed files with 5 additions and 0 deletions
5
api.js
5
api.js
|
|
@ -84,6 +84,11 @@ class PlejdApi extends EventEmitter {
|
|||
getDevices() {
|
||||
let devices = [];
|
||||
|
||||
// Just log the devices if debug logging enabled
|
||||
if (debug) {
|
||||
logger(JSON.stringify(this.site));
|
||||
}
|
||||
|
||||
for (let i = 0; i < this.site.devices.length; i++) {
|
||||
let device = this.site.devices[i];
|
||||
let deviceId = device.deviceId;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue