From 4847d4d8b772ecc5605d5beaf34d1962fdd5f8e5 Mon Sep 17 00:00:00 2001 From: mrbungle64 Date: Wed, 21 Feb 2024 07:46:00 +0100 Subject: [PATCH] A few minor improvements --- main.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/main.js b/main.js index 54fae65..b3695e6 100644 --- a/main.js +++ b/main.js @@ -180,13 +180,16 @@ class EcovacsDeebot extends utils.Adapter { this.setConnection(false); return; } - this.log.info('Successfully connected to Ecovacs server'); - this.log.info('Number of devices: ' + numberOfDevices); - this.log.debug('Devices:' + JSON.stringify(devices)); + this.log.info(`Successfully connected to Ecovacs server. Found ${numberOfDevices} device(s) ...`); + this.log.debug(`Devices: ${JSON.stringify(devices)}`); for (let d = 0; d < numberOfDevices; d++) { - this.log.info('Device[' + d + ']: ' + JSON.stringify(devices[d])); + const deviceJsonString = JSON.stringify(devices[d]); + if (d === this.deviceNumber) { + this.log.info(`Using Device[${d}]: ${deviceJsonString}`); + } else { + this.log.debug(`Device[${d}]: ${deviceJsonString}`); + } } - this.log.info('Using device Device[' + this.deviceNumber + ']'); const vacuum = devices[this.deviceNumber];