From e0cc8647cc8246fde6f391af967a5267acaaf346 Mon Sep 17 00:00:00 2001 From: mrbungle64 Date: Thu, 22 Feb 2024 17:05:07 +0100 Subject: [PATCH] A few minor changes --- main.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/main.js b/main.js index 88efddc..fb5e495 100644 --- a/main.js +++ b/main.js @@ -157,13 +157,14 @@ class EcovacsDeebot extends utils.Adapter { } else { this.log.warn('Missing device Number in adapter config. Using value 0'); } - const password_hash = EcoVacsAPI.md5(this.password); - const deviceId = EcoVacsAPI.getDeviceId(nodeMachineId.machineIdSync(), this.config.deviceNumber); - const continent = (ecovacsDeebot.countries)[this.config.countrycode.toUpperCase()].continent.toLowerCase(); if (this.config.pollingInterval && (Number(this.config.pollingInterval) >= 60000)) { this.pollingInterval = Number(this.config.pollingInterval); } + const password_hash = EcoVacsAPI.md5(this.password); + const deviceId = EcoVacsAPI.getDeviceId(nodeMachineId.machineIdSync(), this.config.deviceNumber); + const continent = (ecovacsDeebot.countries)[this.config.countrycode.toUpperCase()].continent.toLowerCase(); + let authDomain = ''; if (this.getConfigValue('authDomain') !== '') { authDomain = this.getConfigValue('authDomain'); @@ -223,8 +224,8 @@ class EcovacsDeebot extends utils.Adapter { this.setStateConditional('info.deviceImageURL', this.getModel().getProductImageURL(), true); this.setStateConditional('info.library.communicationProtocol', this.getModel().getProtocol(), true); this.setStateConditional('info.library.deviceIs950type', this.getModel().is950type(), true); - this.log.info(`Product name: ${this.getModel().getProductName()}`); this.log.info(`Library version: ${api.getVersion()}`); + this.log.info(`Product name: ${this.getModel().getProductName()}`); this.retries = 0; (async () => {