Skip to content

Commit

Permalink
A few minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mrbungle64 committed Feb 22, 2024
1 parent 5a5fa94 commit e0cc864
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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 () => {
Expand Down

0 comments on commit e0cc864

Please sign in to comment.